|
[Sponsors] |
July 12, 2005, 10:28 |
Time dependant BC's
|
#1 |
Guest
Posts: n/a
|
I want to look at transient flow in a simple rectangle chamber. The flow will be driven from an inlet and will leave the chamber via a single outlet.
I would like to change the mass flow rate entering the chamber and set it as a function of time. For now lets say 0.1kg/s for the first 10 secs and then 0.2 kg/s for the next 50 secs. Any pointers on how to set up this time dependant BC's. Do I need to look at UDF's? |
|
July 12, 2005, 12:39 |
Re: Time dependant BC's
|
#2 |
Guest
Posts: n/a
|
yes,you can use UDF to specify the BC.
|
|
July 12, 2005, 13:09 |
Re: Time dependant BC's
|
#3 |
Guest
Posts: n/a
|
If it is a step change like you describe, just run the transient for ten seconds, change the BC, and pick up the transient where you left off for the remaining 50 seconds.
|
|
July 12, 2005, 17:01 |
Re: Time dependant BC's
|
#4 |
Guest
Posts: n/a
|
Thank you both for your responding. The simple case I described was given to help give me an insight into the process of setting up and running UDF's. And so that's why I didn't just run, change and then re-run.
I will do more trialling and then come back with questions, as/if they arise. |
|
July 12, 2005, 17:40 |
Re: Time dependant BC's
|
#5 |
Guest
Posts: n/a
|
Hi, this is an example from my UDF to change the inlet temperature as a function of time. You can do the same thing as this.
/* Define boundary profiles */ DEFINE_PROFILE(heating_rate,t,i) { float rate, T; real factor; real flow_time = RP_Get_Real("flow-time"); face_t f; rate = 0.0125; /* deg per sec */ factor = 1000.; begin_f_loop(f,t) { if (flow_time > 4) F_PROFILE(f,t,i) = 443; else if (flow_time > 3.3) F_PROFILE(f,t,i) = 420; else if (flow_time > 1) F_PROFILE(f,t,i) = 400; else if (flow_time >0.1) F_PROFILE(f,t,i) = 393; else F_PROFILE(f,t,i) = 373; } end_f_loop(f,t) } |
|
July 13, 2005, 05:17 |
Re: Time dependant BC's
|
#6 |
Guest
Posts: n/a
|
Thanks Quak,
A few 'follow-up' questions, if I may, What is the role the variables 'factor' and 'rate' in your UDF? You set 'T' to be a real. since 'C' is case sensitive what also is this variable used for. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
calculation diverge after continue to run | zhajingjing | OpenFOAM | 0 | April 28, 2010 05:35 |
Time dependant velocity profile | en51nm | STAR-CCM+ | 1 | July 15, 2009 08:20 |
unsteady calcs in FLUENT | Sanjay Padhiar | Main CFD Forum | 1 | March 31, 1999 13:32 |