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

Creating time/temp dependant variable

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By sur4j
  • 1 Post By maybee
  • 1 Post By maybee
  • 1 Post By maybee

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 21, 2013, 14:59
Default Creating time/temp dependant variable
  #1
Member
 
Join Date: Aug 2013
Posts: 60
Rep Power: 12
sur4j is on a distinguished road
I am trying to create a time and temperature dependant variable within the solidDisplacementFoam solver, currently the value is defined as a constant volScalarField as shown:
volScalarField mu("mu", E/(2.0*(1.0 + nu)));
I need this to change in the following way: When reaching a certain temperature it should start increasing at a constant rate in time up till reaching a final value at which it stops increasing. I attempted to do this by adding the following code into the main .C file:
Code:
forAll(mu.internalField(), cellI)
{
if(T.internalField()[cellI]>330){
 mu.internalField()[cellI] = 10e+06;
      }
}
mu.correctBoundaryConditions();
mu currently is set to a constant value upon reaching 330K temperature, how would I make this so that it increases at a constant rate in time and stops at a new larger value of mu when reaching the temperature?

Any help at all with this problem would be greatly appreciated. Thank you.

Last edited by sur4j; December 22, 2013 at 06:07.
sur4j is offline   Reply With Quote

 


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
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 04:35
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 04:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 20:09


All times are GMT -4. The time now is 01:15.