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

Use of nu in simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Swagga5aur

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2017, 08:57
Question Use of nu in simpleFoam
  #1
New Member
 
nicky chaigneau
Join Date: Jun 2017
Posts: 12
Rep Power: 9
chicky is on a distinguished road
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.
chicky is offline   Reply With Quote

Old   June 23, 2017, 18:08
Post
  #2
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
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))
which is quite similar to the code in the createFields dictionary.

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.
Attached Files
File Type: gz TemperatureSimpleFoamAndNuTemperature.gz (3.7 KB, 64 views)
Swagga5aur is offline   Reply With Quote

Old   June 24, 2017, 02:46
Default
  #3
New Member
 
nicky chaigneau
Join Date: Jun 2017
Posts: 12
Rep Power: 9
chicky is on a distinguished road
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
chicky is offline   Reply With Quote

Old   September 8, 2018, 21:53
Default using nu nu[...]
  #4
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
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?
fede32 is offline   Reply With Quote

Old   September 12, 2018, 06:17
Default
  #5
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
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
Swagga5aur is offline   Reply With Quote

Old   September 12, 2018, 10:31
Default
  #6
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by Swagga5aur View Post
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

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!
fede32 is offline   Reply With Quote

Old   September 12, 2018, 11:16
Default
  #7
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Ah good didn't even notice

Glad that it works now!
fede32 likes this.
Swagga5aur is offline   Reply With Quote

Reply

Tags
simplefoam, solver development, transportproperties


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
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


All times are GMT -4. The time now is 17:42.