|
[Sponsors] |
February 12, 2014, 01:21 |
UDF Profile Update once in one time step
|
#1 |
New Member
liuyaping
Join Date: Feb 2014
Posts: 1
Rep Power: 0 |
Hi Everyone,
I am working on a transient case and using a UDF with DEFINE_Adjust macro.. I want to use a udf controlling a boundary only updated once within one time step.The udf like this: #include "udf.h" #define Vg 1.0e-05 #define H 0.02 #define Rg 0.01 real current=0.0; real profile=-0.01; DEFINE_ADJUST(name,domain) { current = RP_Get_Real("flow-time"); } DEFINE_PROFILE(density,thread,position) { real k,t; face_t f; if(profile !=current) { begin_f_loop(f,thread) { t=RP_Get_Real("physical-time-step"); k=Vg*t/(H-Vg*t); F_PROFILE(f,thread,position)=F_UDSI(f,thread,0)+F_ UDSI(f,thread,0)*(1-Rg)*k; } end_f_loop(f,thread) } profile=current; } I found that can't achieve my goal.Can anyone here help? Thank you. Radit |
|
February 12, 2014, 07:30 |
|
#2 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
If you give detailed information about your problem, it is much easier to find the solution. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transient simulation not converging | skabilan | OpenFOAM Running, Solving & CFD | 14 | December 17, 2019 00:12 |
how to use velocity of current time step in next time step to update it | aks | CFX | 16 | October 16, 2013 08:14 |
mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 10:34 |
Full pipe 3D using icoFoam | cyberbrain | OpenFOAM | 4 | March 16, 2011 10:20 |
Modeling in micron scale using icoFoam | m9819348 | OpenFOAM Running, Solving & CFD | 7 | October 27, 2007 01:36 |