|
[Sponsors] |
February 24, 2016, 07:22 |
UDF Pressure
|
#1 |
New Member
scool
Join Date: Feb 2016
Posts: 5
Rep Power: 10 |
Hello,
I have a problem with my UDF (Execut-on-demand) after compiling and interprets it is not execut, and i have this message: 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: () /************************************************* this my Udf **************************************************/ #include "udf.h" DEFINE_ON_DEMAND(my_adjust) { int ID=4; Domain *domain; Thread *t = Lookup_Thread(domain, ID); real x[ND_ND]; cell_t c; face_t f; domain=Get_Domain(1); thread_loop_c(t,domain) { begin_c_loop(c,t) if (C_P(c,t)<0) {C_P(c,t)=0;} end_c_loop(c,t) } thread_loop_f(t,domain) { begin_f_loop(f,t) if (F_P(f,t)<0) {F_P(f,t)=0;} end_f_loop(c,t) } } /***********************************************/ Last edited by NewFluent; February 25, 2016 at 12:20. |
|
February 24, 2016, 16:36 |
urgent
|
#2 |
New Member
scool
Join Date: Feb 2016
Posts: 5
Rep Power: 10 |
Dear all,
In my simulation, I want to modify the pressure in to domain film when the pressure is negative then the pressure equal a zero. |
|
February 29, 2016, 18:57 |
|
#3 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
You need to initialise 'domain' before calling it with the Lookup_Thread macro, for example:
Code:
int ID=4; Domain *domain = Get_Domain(1); Thread *t = Lookup_Thread(domain, ID); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to adjust pressure outlet | a.lynchy | FLUENT | 4 | February 15, 2021 01:50 |
static vs. total pressure | auf dem feld | FLUENT | 17 | February 26, 2016 14:04 |
sonicFoam - pressure driven pipe: flow continuity violation and waveTransmissive BC | Endel | OpenFOAM Running, Solving & CFD | 3 | September 11, 2014 17:29 |
Pressure BC for combustion chamber | Giuki | FLUENT | 1 | July 19, 2011 12:35 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 03:15 |