CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > STAR-CCM+

Starting turbulence models later after a few hundred iterations.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 12, 2011, 02:56
Default Starting turbulence models later after a few hundred iterations.
  #1
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 5
hamzamotiwala is on a distinguished road
Hey everyone,

Is there a way to turn on the turbulence models automatically after a few 100 iterations?

Its something similar to turning on a Heat Exchanger model (if you are familiar with it).

Is it possible in someway with the help of field functions or something?

Thanks,
Hamza
hamzamotiwala is offline   Reply With Quote

Old   October 13, 2011, 16:59
Default
  #2
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 637
Rep Power: 11
abdul099 is on a distinguished road
No, to turn on the model, you have to stop the simulation, therefore you can't do it with a field function.
What you can do is to record a java macro and adjust the number of iterations before switching on the turbulence model.
abdul099 is offline   Reply With Quote

Old   October 25, 2011, 08:50
Default
  #3
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 5
hamzamotiwala is on a distinguished road
hey abdul,

thanks for the idea...but doesnt recording the macro mean that i need to make a recording upto that many iterations?

and is it automatic, i mean the recording..does the recording turn on and off on its own if i send the simulation to the cluster?

because to run the simulation locally would take some time even for just a few 100 iterations....
hamzamotiwala is offline   Reply With Quote

Old   October 25, 2011, 09:00
Default
  #4
Super Moderator
 
Ryne Whitehill
Join Date: Aug 2009
Posts: 313
Rep Power: 8
rwryne is on a distinguished road
Quote:
Originally Posted by hamzamotiwala View Post
hey abdul,

thanks for the idea...but doesnt recording the macro mean that i need to make a recording upto that many iterations?

and is it automatic, i mean the recording..does the recording turn on and off on its own if i send the simulation to the cluster?

because to run the simulation locally would take some time even for just a few 100 iterations....
Recording the macro is just to get you started, like to get the correct commands for turning on/off the turbulence. You then have to modify the script it generates to add logic that checks for the current iteration and turns it on.

You can then submit the job to the cluster using the script
rwryne is offline   Reply With Quote

Old   October 25, 2011, 09:10
Default
  #5
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 5
hamzamotiwala is on a distinguished road
Thanks Ryne,

Will try that out and get back to you..since I have never done something like this before...I might need assistance...
hamzamotiwala is offline   Reply With Quote

Old   October 25, 2011, 19:32
Default
  #6
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 637
Rep Power: 11
abdul099 is on a distinguished road
Just record a macro and run the simulation for let's say 5 steps, and then switch on the turbulence model. Than have a look at the macro. There will be somewhere a line containing either the number of steps until you stopped the simulation or just a run(); command. Don't know without looking it up. Just modify this line, by either changing the number or when there's the run-command, change it to run(500); or which number of iterations you want before switching on the turbulence mode.

To run it on the cluster, you just have to submit your job with the macro. There's the -batch command line option. Just add the path to your macro directly after the -batch, e.g. -batch turbulencemodelstartmacro.java
abdul099 is offline   Reply With Quote

Old   October 28, 2011, 04:16
Default
  #7
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 5
hamzamotiwala is on a distinguished road
Hey guys,

I tired recording a macro and then modifying it but there was no information about the iterations when the turbulence model was turned on and off. Its just something like turnturbulenceon(false/true)..

Ryne when you said that I need to add logic to the code, did you mean I should write my own code to detect the iterations?

because I couldnt find any numbers in the code denoting the iterations.
hamzamotiwala is offline   Reply With Quote

Old   October 28, 2011, 08:51
Default
  #8
Super Moderator
 
Ryne Whitehill
Join Date: Aug 2009
Posts: 313
Rep Power: 8
rwryne is on a distinguished road
Quote:
Originally Posted by hamzamotiwala View Post
Hey guys,

I tired recording a macro and then modifying it but there was no information about the iterations when the turbulence model was turned on and off. Its just something like turnturbulenceon(false/true)..

Ryne when you said that I need to add logic to the code, did you mean I should write my own code to detect the iterations?

because I couldnt find any numbers in the code denoting the iterations.
Yes, you would have to add a logical statement checking the iteration count yourself.

A simpler method would be what abdul recommended:
Run(500 iterations)
Turn Turbulence On
Run(4500 iterations)

rwryne is offline   Reply With Quote

Old   November 29, 2011, 12:53
Default
  #9
New Member
 
Harsh Shah
Join Date: Jul 2011
Posts: 4
Rep Power: 5
gocfd is on a distinguished road
Under the solvers, ramp up the turbulence model URF and keep initial value to zero and define start iteration to 100 and probably can define end iteration to 200 or so.
gocfd is offline   Reply With Quote

Old   December 7, 2011, 08:53
Default
  #10
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 5
hamzamotiwala is on a distinguished road
Quote:
Originally Posted by gocfd View Post
Under the solvers, ramp up the turbulence model URF and keep initial value to zero and define start iteration to 100 and probably can define end iteration to 200 or so.

Is ramping similar to freezing the solver?
hamzamotiwala is offline   Reply With Quote

Old   December 7, 2011, 10:40
Default
  #11
New Member
 
Harsh Shah
Join Date: Jul 2011
Posts: 4
Rep Power: 5
gocfd is on a distinguished road
As long as URF value for turbulence is zero, the value of turbulence variables (depends on turbulence model) wan't be updated (remains constant as of initial values). Even though it is different from freezing the solver, it works in most of the cases.
gocfd is offline   Reply With Quote

Old   December 9, 2011, 04:25
Default
  #12
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 5
hamzamotiwala is on a distinguished road
Quote:
Originally Posted by gocfd View Post
As long as URF value for turbulence is zero, the value of turbulence variables (depends on turbulence model) wan't be updated (remains constant as of initial values). Even though it is different from freezing the solver, it works in most of the cases.
Ok. I asked because I thought URF usually decides how much percentage of the previous iteration it takes to calculate the new step and setting the value to 0 would mean that I would be calculating the turbulence value for every iteration from scratch all the time. or am I completely wrong here about URFs?
hamzamotiwala is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 14:02
Low Mach number Compressible jet flow using LES ankgupta8um OpenFOAM Running, Solving & CFD 7 January 15, 2011 13:38
directMapped problem panda60 OpenFOAM Bugs 4 July 8, 2010 10:23
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 12:30
Negative value of k causing simulation to stop velan OpenFOAM Running, Solving & CFD 1 October 17, 2008 05:36


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