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

reading nu for multiphase flows

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2011, 12:00
Default reading nu for multiphase flows
  #1
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
Hi everybody,

I want to extend a solver from single to multiphase flows. At one point I am stuck because of the reading of the transportPropterties.

The "old" code says:
Code:
dimensionedScalar nu(transportProperties.lookup("nu"));
If I get it right, I will have a nu1 and nu2 for multiphase flows. Can I only access them via createFields or can it be read by transportProperties...?

Thanks for your help!
Lindstroem
lindstroem is offline   Reply With Quote

Old   September 19, 2011, 16:50
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
createFields reads from transportProperties. If you want nu1 and nu2 defined, you need to modify your solver - and why not change createFields?
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   September 20, 2011, 04:51
Default
  #3
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
Hi David,

thanks for your suggestion. Actually I need them in a function where I calculate some forces (outside the solver). Up to now, I did not use createFields for this function, only for the solver. I hoped there was an easy way to read them just like for a single phase flow.

Thanks..
lindstroem is offline   Reply With Quote

Old   September 20, 2011, 05:17
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
You can have a peek in the createFields.H file of interFoam to see how it is done.
Bernhard is offline   Reply With Quote

Old   September 20, 2011, 05:35
Default
  #5
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
Quote:
Originally Posted by Bernhard View Post
You can have a peek in the createFields.H file of interFoam to see how it is done.
So in a similar manner like
Code:
 twoPhaseMixture twoPhaseProperties(U, phi, "alpha1");
    const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
    const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
Ok, then I need to extend the functions as expected. I hoped to have sth like
Code:
dimensionedScalar nu1(transportProperties.lookup("nu1"));
Thanks!
lindstroem is offline   Reply With Quote

Old   September 20, 2011, 05:43
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
That second option is of course also possible. Did you try it already?
Bernhard is offline   Reply With Quote

Old   September 20, 2011, 05:48
Default
  #7
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
Yes, but... it compiles, but I get the error
Code:
keyword nu1 is undefined in dictionary "[..]/constant/transportProperties"

file: [..]constant/transportProperties from line 19 to line 32.
lindstroem is offline   Reply With Quote

Old   September 20, 2011, 06:06
Default
  #8
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
twoPhaseMixture.H provides a volScalarField nu so thats the way i will get access to it:
Code:
twoPhaseMixture twoPhaseProperties(U, phi, "alpha1");
const volScalarField& nu = twoPhaseProperties.nu();
Thanks for your help!
lindstroem is offline   Reply With Quote

Old   September 20, 2011, 06:16
Default
  #9
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Quote:
Originally Posted by lindstroem View Post
Yes, but... it compiles, but I get the error
Code:
keyword nu1 is undefined in dictionary "[..]/constant/transportProperties"

file: [..]constant/transportProperties from line 19 to line 32.
Which means that you have to provide a nu1 in the transportProperties file, but you already found your solution.
Bernhard is offline   Reply With Quote

Old   September 20, 2011, 06:20
Default
  #10
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
When I provided a nu1 it was complaining that it did not find a nu (which i did not call any longer from my force-calculation-function). Yes, I'll try it with the scalarField.

Thanks!
lindstroem is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[Commercial meshers] Problem converting fluent mesh vinz OpenFOAM Meshing & Mesh Conversion 28 October 12, 2015 07:37
Cht tutorial in 15 braennstroem OpenFOAM Running, Solving & CFD 197 June 10, 2015 04:02
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 18:51
[Commercial meshers] Converting a mesh with splitted cells using fluentMeshToFoam jlpelerin OpenFOAM Meshing & Mesh Conversion 4 April 25, 2011 17:56
problem when converting mesh (made by ICEM) using fluentMeshToFoam Forrest_Lei OpenFOAM 11 October 16, 2009 07:28


All times are GMT -4. The time now is 18:34.