|
[Sponsors] |
May 23, 2011, 21:47 |
Multi-UDFs Initialisation error
|
#1 |
New Member
ZHAOHUI
Join Date: Jan 2011
Location: QLD
Posts: 9
Rep Power: 15 |
Please have a look at my problem.Just so confused on this.hope someone could help me to figure it out. thanks in advance!
the UDFs is posted below: #include <udf.h> #define BMODULUS 2.2e9 #define rho_ref 1000.0 #define p_ref 101325 DEFINE_PROPERTY(superfluid_density, c, t) { real rho; real p, dp; real p_operating; p_operating = RP_Get_Real ("operating-pressure"); p = C_P(c,t) + p_operating; dp = p-p_ref; rho = rho_ref/(1.0-dp/BMODULUS); return rho; } DEFINE_PROPERTY(sound_speed, c,t) { real a; real p, dp,p_operating; p_operating = RP_Get_Real ("operating-pressure"); p = C_P(c,t) + p_operating; dp = p-p_ref; a = (1.-dp/BMODULUS)*sqrt(BMODULUS/rho_ref); return a; } DEFINE_PROFILE (unsteady_pressure, thread, position) { face_t f; float a = 0.000470; begin_f_loop(f, thread) { real t = RP_Get_Real("flow-time"); F_PROFILE(f, thread, position) = (1e+12)*t-(2e+15)*t*t-(6e+17)*t*t*t+10; } end_f_loop(f, thread) } the error displayed as: Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () |
|
May 24, 2011, 08:17 |
|
#2 |
New Member
Join Date: Mar 2011
Posts: 10
Rep Power: 15 |
Hi,
as I can see you copied big parts of your UDF out of the FLUENT UDF manual. Note that "RP_Get_Real ("operating-pressure")" is referring to a Scheme variable you have to define within the command line of FLUENT. Alternatively, define "operating_pressure" as a constant or global variable in your UDF. The same with "real t = RP_Get_Real("flow-time")". Use the solver macro CURRENT_TIME instead. I hope that helps. Regards d |
|
May 24, 2011, 09:01 |
|
#3 |
New Member
Join Date: Mar 2011
Posts: 10
Rep Power: 15 |
so this is what I meant with declaring p_operating as a constant. In my case the reference pressure and the operating operating pressure have the same value, so dp = p, but I left it to make it clear.
#define BMODULUS 2.2e9 /* Pa*/ #define rho_ref 1000.0 /* kg/m³*/ #define p_ref 101325 /*Pa*/ #define p_operating 101325 /*Pa*/ DEFINE_PROPERTY(mod_density,c,t) { real rho_water; real p, dp; p = C_P(c,t) + p_operating; dp = p - p_ref; rho_water = rho_ref/(1.0-dp/BMODULUS); return rho_water; } |
|
May 25, 2011, 02:47 |
|
#4 | |
New Member
ZHAOHUI
Join Date: Jan 2011
Location: QLD
Posts: 9
Rep Power: 15 |
Quote:
Just as you thought, I am really a begainer on Fluent.When face some problem, i usually try to find help from Fluent Doc first.I appreciate your kind help! In order to conquer this with your assistance, maybe it would be better to show you some details about my case first .what i am simulating is the process of high pressure(transient) water ejecting into air using VoF Multiphase +turbulent model k-epsilon. I made some modification in my UDF file posted below and the same error happened.hope you help me again on this! thanks a lot! Regards truly, zhao #include <udf.h> #define BMODULUS 2.2e9 /* Pa*/ #define rho_ref 1000.0 /* kg/m?*/ #define p_ref 101325 /*Pa*/ #define p_operating 101325 /*Pa*/ DEFINE_PROPERTY(mod_density,c,t) { real rho_water; real p, dp; p = C_P(c,t) + p_operating; dp = p - p_ref; rho_water = rho_ref/(1.0-dp/BMODULUS); return rho_water; } DEFINE_PROPERTY(sound_speed, c,t) { real a; real p, dp; p = C_P(c,t) + p_operating; dp = p-p_ref; a = (1.-dp/BMODULUS)*sqrt(BMODULUS/rho_ref); return a; } DEFINE_PROFILE (unsteady_pressure, thread, position) { face_t f; begin_f_loop(f, thread) { real t = CURRENT_TIME; F_PROFILE(f, thread, position) = (1e12)*t-(2e15)*t*t-(6e17)*t*t*t+10; } end_f_loop(f, thread) } |
||
January 10, 2014, 18:23 |
|
#5 |
New Member
Aileen Magee
Join Date: Sep 2013
Posts: 24
Rep Power: 12 |
Hello,
I am having the same problem as you! Did you manage to correct it? Thankyou |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CGNS Compiling | Diego | Main CFD Forum | 17 | December 21, 2014 01:40 |
checking the system setup and Qt version | vivek070176 | OpenFOAM Installation | 22 | June 1, 2010 12:34 |
compile errors of boundary condition "expDirectionMixed" | liying02ts | OpenFOAM Bugs | 2 | February 1, 2010 20:11 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 20:50 |