|
[Sponsors] |
May 30, 2012, 04:33 |
Dependency of diffusivity from temperature
|
#1 |
New Member
Join Date: May 2012
Posts: 1
Rep Power: 0 |
Hi,
I try to modify laplacianFoam solver and make depency of DT from temperature. Something like this: if T>0 then DT=0.56 else DT=2.21. Taking a temperature from previous time layer is ok. But i don't understand how to make OpenFoam fill each value of dimensionedScalar from respective value of calculated T. |
|
May 30, 2012, 04:53 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
some thing like this:
Code:
forAll (T, celli) { if (T[celli] > 0) { DT[celli] =0.56; } else { DT[celli] =2.21; } } you should change diffusivity definition from dimensionedScalar into VolScalarField |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |