CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Changing some variables at scalarCodedsource without direct contact with openfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2015, 12:11
Default Changing some variables at scalarCodedsource without direct contact with openfoam
  #1
Senior Member
 
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16
Asghari_M is on a distinguished road
Hello everyone!
There is a transient heat source in my problem according to the following relation:

Code:
S(heat)=N × sqrt(t) ;

That t is time and N is an integer multiplier.
I can use the following code in the heat source term definition indicated at scalarCodedSource in fvOptions only for one multiplier (for example N=1):
Code:
N=1;
heSource -= N* sqrt(time.value())*V;
However, I want to do 30 runs for a geometry case. Every run is corresponding to one n.
Really, multiplier (N) Varies from one to 30.After the simulation has ended, the data of the last time-step is saved to a separate directory. Similar task has been described for inlet velocity at following link by PyFoam (and in 2.2 parameter variation):
https://openfoamwiki.net/index.php/Contrib/PyFoam ------->2.2parameter variation
In the other words, I want to vary source term value without direct contact with OpenFoam2.3.1 in a loop structure. How can I do this operation?
Thanks in advance for any help.
Asghari_M is offline   Reply With Quote

Reply

Tags
heat source term, parameter variation, scalarcodedsource


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
Can OpenFOAM simulate rubber flow when changing from its solid to liquid phase? sur4j OpenFOAM 0 September 21, 2013 07:05
[swak4Foam] a script for changing variables in groovyBC in 0 folder immortality OpenFOAM Community Contributions 38 July 22, 2013 18:57
[OpenFOAM.org] Changing $ParaView_DIR for use with multiple OpenFOAM versions Razman OpenFOAM Installation 0 September 17, 2012 10:45
Changing contact line tfe FLOW-3D 3 December 8, 2009 03:59
changing variables in any iteration using udfs Asghari FLUENT 2 August 11, 2006 10:06


All times are GMT -4. The time now is 07:47.