TAGGED: #multiphase_models, udf, vof
-
-
November 12, 2024 at 3:01 amraju.chowdhurySubscriber
I want to use temperature-dependent density for the gas phase (secondary phase) in my VOF multiphase model. The udf is as follows:
#include "udf.h"
#include "math.h"
DEFINE_PROPERTY(cell_density,c,t)
{
/* Declare local variables */
real g_density;
real temp;
/* Retrieve temperature of phase 2 */
Thread *phase_thread = THREAD_SUB_THREAD(t, 1);
temp = C_T_M1(c, phase_thread);
/* Apply temperature-dependent density correlation */
if (temp > 273.0)
g_density = 486.27 * pow(temp, -1.0);
else
 g_density = 1.63;
return g_density;
}
While compiling the code, getting the following error:
==============================================================================
Node 0: Process 139300: Received signal SIGSEGV.
==============================================================================
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed: No such file or directory
999999: mpt_accept: error: accept failed:
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= RANK 0 PID 139300 RUNNING AT CNA309-6LJDRZ2
= EXIT STATUS: -1 (ffffffff)
===================================================================================
The fl process could not be started.
Also, after compiling the code, fluent is not allowed to initialize. See the below screenshot.
Â
If anyone can help to resolve the issue, that would be great.
Thanks.
-
November 12, 2024 at 11:21 amRobForum Moderator
Why are you using the previous time step data?Â
-
November 12, 2024 at 12:11 pmraju.chowdhurySubscriber
Yes, got it. It would be C_T instead of C_T_M1. Thank you for noticing that. I will try with this.
-
November 12, 2024 at 2:22 pmsjohnSubscriber
Hi Rob,Â
I would also like to implement density change based on temperature but use ideal gas law which requires pressure and temperature. How would I retrieve pressure of phase 2 in the above code? I am not at all familiar with UDF but had learnt the C programming language decades ago.Â
Thanks. -
November 12, 2024 at 2:45 pmRobForum Moderator
sjohn - you can't alter density with pressure other than ideal or Real Gas as it messes with the continuity equation.Â
raju - Yes, but check phase calls too. Temperature is a mixture thread variable in VOF, enthalpy is phase thread: I think, hence you checking.Â
-
November 12, 2024 at 4:30 pmsjohnSubscriber
That's right Rob, I was wondering if I can mimic combustion of a monopropellant to form gasesous products. Using another CFD software my colleague was able to specify reduction in density of the monoprop in cells, wherein the monoprop temperature exceeded the ignition temperature. In Fluent, would I need to write a UDF or is there another way?
-
November 12, 2024 at 5:09 pmRobForum Moderator
If you can ignore the pressure effect you can have the temperature for density. Or there's sink/source terms for mass based on whatever you need to include.Â
-
- You must be logged in to reply to this topic.
- error udf
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Diesel with Ammonia/Hydrogen blend combustion
- Fluent fails with Intel MPI protocol on 2 nodes
- Non-Intersected faces found for matching interface periodic-walls
- Encountering Error in Heterogeneous Surface Reaction
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- How to obtain axial and tangential velocity in CFX-post?
- Cyclone (Stairmand) simulation using RSM
-
1131
-
468
-
455
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.