June 25, 2020 at 11:59 pmjianan.zhaoSubscriber
I am working on a VOF+DPM model, in which I would like to calculate how many particles are in the 2nd phase after each flow time step. The UDF seems to work in serial mode, but in parallel mode, the calculation is not accurate due to the unknown issue with the UDF.
When in parallel mode, at the end of each time step, the UDF loops all the particles to verify the volume fraction of the 2nd phase in the cell which contains the particle is larger than a specific value (Vofm), and then writes down the number of particles to a local file. However, as the parallel processes increase, the total number of particles in 2nd phase increases at the same time step.
I am using hybrid method for DPM model and below is the UDF.
Any help is appreciated!
June 26, 2020 at 12:02 amjianan.zhaoSubscriber
#define Vofm 1.0 // define vof_m volume to judge the particle to be counted or not
int num_par; // number of particles in phase 2
num_par = 0;
num_par = 0;
int zone_ID=63; // subdomain, make sure different domains have diferent IDs
Thread *mixture_thread = Lookup_Thread(d,zone_ID);
pt = THREAD_SUB_THREADS(mixture_thread);
June 26, 2020 at 12:03 amjianan.zhaoSubscriber
Injection *dpm_injections = Get_dpm_injections();
// iterate all injections and particles
if (C_VOF(c, pt) >= Vofm)
num_par = num_par + 1;
June 26, 2020 at 12:06 am
June 26, 2020 at 5:35 amDrAmineAnsys Employee
Hard to comment: what is now wrong? Can you debug the parallel part line by line?
June 26, 2020 at 1:14 pmjianan.zhaoSubscriber
Hi Amine, for example, I tested the UDF by setting Vofm to 1.0 (if volume fraction of 2nd phase is higher or equal to Vofm, then number of particle +1), and ran it with 16 processes. The number of particles in the celll with Vofm >= 1.0 was zero. However, when I changed the processes to 64, the number of particles was larger than zero.
June 26, 2020 at 1:35 pmDrAmineAnsys Employee
Can you debug the parallel part line by line? as I said hard to comment here especially as you splitted the post into 3 parts. Just to let you know that the default behavior is that particles are only tracked with primary phase.
I think you have some issues with your parallelization of the UDF.
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth 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.
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.
- 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
© 2023 Copyright ANSYS, Inc. All rights reserved.