Tagged: crash, multiphase, udf, volume
-
-
March 12, 2022 at 10:25 am
prebenjs
SubscriberHi,
I'm trying to get the volume of the each cell adjacent / on a face. A section of the UDF is shown below. The code crashes when i introduce C_VOLUME. I suspect that it might be caused by the wrong input here but I'm struggling to see what the reason actually is. Can anybody advice me on this ?
DEFINE_PROFILE(name,th,i)
face_t f
cell_t c;
mixture_domain = Get_Domain(1);
Thread* t;
Thread* t_prim; /*= THREAD_SUB_THREAD(mixture_domain, prim_phase_domain_index);
Thread* t_sec; /* = THREAD_SUB_THREAD(mixture_domain, sec_phase_domain_index);
t = Lookup_Thread(mixture_domain, 11);
begin_f_loop(f, th)
{
if PRINCIPAL_FACE_P(f, th) {
c = F_C0(f, t);
volume_fraction_ = C_VOF(c, t_sec);
volume =C_VOLUME(c,t); }
March 14, 2022 at 10:06 amDrAmine
Ansys EmployeeWrong / Bad UDF syntax: You can retrive for t = Lookup_Thread(mixture_domain, 11) the phase level associated face threads. You use then these threads to access whatever you want.
The DEFINE_PROFILE you are hooking at certain boundary and from there you get the thread pointer "th" (I assume phase level thread for that reason . From that "th" you can check/ or enforce mixture level thread (THREAD_SUPER_THREAD). From that Super_THREAD you can go lower level to have the phase level threads.
So the problem is now: what is "t": it is declared and defined by you are not looping on it. Moreover is it a cell thread or face thread.
I recommend attending some training!
Viewing 1 reply thread- You must be logged in to reply to this topic.
Ansys Innovation SpaceEarth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
Trending discussions- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
Top Contributors-
2656
-
2120
-
1347
-
1118
-
461
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-