|
[Sponsors] |
June 23, 2017, 08:57 |
Use of nu in simpleFoam
|
#1 |
New Member
nicky chaigneau
Join Date: Jun 2017
Posts: 12
Rep Power: 9 |
Hello everyone, I am new to cfd especially to openfoam. I try to implement a solver Tsimplefoam wich is simplefoam with temperature fields.
When I discover the file simpleFoam.C I see that the transportProperties was not called. Does it mean that simpleFoam doesn't use nu ? I find it very strange because Navier-Stoke steady-state still have the viscosity parameter. |
|
June 23, 2017, 18:08 |
|
#2 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Nicky,
Well the simpleFoam solver does include the nu property from the transportProperties, however, not everything of the solver is defined in the simpleFoam.C folder or createFields. If you consider the options file in the make folder, -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ is included and if you look at the singlePhaseTransportModel.H the following piece of code secures the loading of the nu viscosity: Code:
IOdictionary ( IOobject ( "transportProperties", U.time().constant(), U.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), viscosityModelPtr_(viscosityModel::New("nu", *this, U, phi)) If you want a varying nu model as a function of the temperature you could implement it yourself. I have attached a TemperatureSimpleFoam solver and a viscosity model, which varies with temperature depending on the specified coefficients. Hope its of any use and let me know if you have any questions. |
|
June 24, 2017, 02:46 |
|
#3 |
New Member
nicky chaigneau
Join Date: Jun 2017
Posts: 12
Rep Power: 9 |
Thank you very much for your reply. I understand better how it works. Implementing nu as a function of temperature is a great idea to train my self with openFOAM. I will try to do it with your file as a model.
Thank you it is great |
|
September 8, 2018, 21:53 |
using nu nu[...]
|
#4 |
Member
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11 |
I have found different results in simulations using in transportProperties:
HTML Code:
nu [0 2 -1 0 0 0 0] 4.43e-5 and HTML Code:
nu nu[0 2 -1 0 0 0 0] 4.43e-5 why could be that? |
|
September 12, 2018, 06:17 |
|
#5 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Could you perhaps elaborate upon this or attach your case and describe how you have tested this?
Its hard to determine what the reason for this may be without additional information. Regards Lasse |
|
September 12, 2018, 10:31 |
|
#6 | |
Member
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11 |
Quote:
Sorry, I found that the error was to write nu glued to the bracket, this way: nu nu[...] It seems openfoam couldn''t read that and so apply a default value. Thanks! |
||
September 12, 2018, 11:16 |
|
#7 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Ah good didn't even notice
Glad that it works now! |
|
Tags |
simplefoam, solver development, transportproperties |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interFoam vs. simpleFoam channel flow comparison | DanM | OpenFOAM Running, Solving & CFD | 12 | January 31, 2020 16:26 |
MPI error with simpleFoam | blaise | OpenFOAM Running, Solving & CFD | 0 | November 7, 2015 15:01 |
simpleFoam parallel solver & Fluent polyhedral mesh | Zlatko | OpenFOAM Running, Solving & CFD | 3 | September 26, 2014 07:53 |
Laminar simpleFoam and inviscid simpleFoam | herenger | OpenFOAM Running, Solving & CFD | 7 | July 11, 2013 07:27 |
Trying to run a benchmark case with simpleFoam | spsb | OpenFOAM | 3 | February 24, 2012 10:07 |