|
[Sponsors] |
July 17, 2004, 06:23 |
static variable
|
#1 |
Guest
Posts: n/a
|
How can i have a static variable in Cfx (in CCL), this is model an iterative process of forces equilibrium. Therefore the last iteration values will be used to change the values of the next iteration. How can i do that? I have looked at CCL and fortran but apparently there are just function. Any help?
Thanks |
|
July 18, 2004, 12:38 |
Re: static variable
|
#2 |
Guest
Posts: n/a
|
1. Create an Additional Variable as a non-transport variable 2. Create a CCL Function which assigns whatever your trying to save to the AV and which gets called at the end of each iteration (Time Step) 3. Use this variable in CEL to set your equilibrium source. 4. Make sure the AV gets initialized to something sensible.
Jeff |
|
July 20, 2004, 05:26 |
Re: static variable
|
#3 |
Guest
Posts: n/a
|
Actually, this is a free surface with a buoyancy problem. At the end of the first iteration, a difference between object_weight and force_z (buoyancy) will exist, therefore the free surface height will need to be adjusted for the next iteration. To converge, a value which i can use as a cumulative variable is required. At the end of the iteration, i ll find the error in buoyancy/weight, with it i ll change height_SF (free surface height) in a form similar to the following height_SF=height_SF + error, i dont see how to do that in CCL.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error: uninitialized local variable 't' used | MASOUD | Fluent UDF and Scheme Programming | 5 | October 17, 2016 05:24 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
defining a term for a domain using DEFINE_ADJUST | MASOUD | Fluent UDF and Scheme Programming | 1 | September 24, 2010 06:08 |
enum | MASOUD | Fluent UDF and Scheme Programming | 0 | June 5, 2010 01:49 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |