|
[Sponsors] |
September 19, 2011, 12:00 |
reading nu for multiphase flows
|
#1 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
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")); Thanks for your help! Lindstroem |
|
September 19, 2011, 16:50 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
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 |
|
September 20, 2011, 04:51 |
|
#3 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
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.. |
|
September 20, 2011, 05:17 |
|
#4 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
You can have a peek in the createFields.H file of interFoam to see how it is done.
|
|
September 20, 2011, 05:35 |
|
#5 | |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Quote:
Code:
twoPhaseMixture twoPhaseProperties(U, phi, "alpha1"); const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); Code:
dimensionedScalar nu1(transportProperties.lookup("nu1")); |
||
September 20, 2011, 05:43 |
|
#6 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
That second option is of course also possible. Did you try it already?
|
|
September 20, 2011, 05:48 |
|
#7 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
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. |
|
September 20, 2011, 06:06 |
|
#8 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
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(); |
|
September 20, 2011, 06:16 |
|
#9 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
Which means that you have to provide a nu1 in the transportProperties file, but you already found your solution.
|
|
September 20, 2011, 06:20 |
|
#10 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
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! |
|
|
|
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 |