CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

static variable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2004, 05:23
Default static variable
  #1
Nico
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
  Reply With Quote

Old   July 18, 2004, 11:38
Default Re: static variable
  #2
Jeff
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
  Reply With Quote

Old   July 20, 2004, 04:26
Default Re: static variable
  #3
Nico
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.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 04:24
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
defining a term for a domain using DEFINE_ADJUST MASOUD Fluent UDF and Scheme Programming 1 September 24, 2010 05:08
enum MASOUD Fluent UDF and Scheme Programming 0 June 5, 2010 00:49
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 20:09


All times are GMT -4. The time now is 20:35.