|
[Sponsors] |
February 14, 2019, 06:10 |
DEFINE_PROFILE for every timestep
|
#1 |
New Member
Join Date: May 2018
Posts: 29
Rep Power: 8 |
Hello again everybody,
I'm currently developing a UDF containing a DEFINE_PROFILE macro. Within that I want to set the mass flow of a mass-inlet boundary condition dependent to the current time of a transient simulation. The problem is, that for my simulation the macro/UDF does not seem to be executed every timestep. Take the following UDF as an example. When I compile & hook this UDF to my mass flow within the boundary condition and then run the simulation, the test message is never shown in the console. It is only shown once after loading the udf (and I think there the value is set once to 0.3). But afterwards the UDF does not seem to be executed again (if I bring in the time dependence with CURRENT_TIME the changes are thus not applied to the actual inlet value) Code:
DEFINE_PROFILE(massinlet_profile, t, i) { Message("TEST MESSAGE TEST MESSAGE \n"); face_t f; begin_f_loop(f, t) { F_PROFILE(f, t, i) = 0.3; } end_f_loop(f, t) } |
|
February 14, 2019, 22:06 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
DEFINE_PROFILE(massinlet_profile, t, i) { face_t f; Message("TEST MESSAGE TEST MESSAGE \n"); begin_f_loop(f, t) { F_PROFILE(f, t, i) = 0.3; } end_f_loop(f, t) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adaptive timestep settings | ROY4 | CFX | 0 | June 16, 2018 06:13 |
error with smaller timestep ? | Thomas MADELEINE | FLUENT | 0 | August 8, 2016 14:02 |
Modifying sonicFoam to run with variable timestep - strange results | dalaron | OpenFOAM Programming & Development | 1 | September 2, 2013 08:21 |
Restart 2-way FSI with different timestep? | Lance | CFX | 10 | April 17, 2013 01:37 |
Timestep and Pressure Correction Relationship in SIMPLE | rks171 | Main CFD Forum | 23 | May 4, 2012 02:04 |