|
[Sponsors] |
why createFields.H for simpleFoam does not read transport properties and nu ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 14, 2017, 09:09 |
why createFields.H for simpleFoam does not read transport properties and nu ?
|
#1 |
New Member
vaibhav
Join Date: Sep 2016
Posts: 15
Rep Power: 10 |
Dear All,
Why createFields.H for simpleFoam does not read transport properties dict and nu but for icoFoam it does? The code below is present in createFields.H for icoFoam but not in simpleFoam. Why is it so ? Info<< "Reading transportProperties\n" << endl; IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); dimensionedScalar nu ( transportProperties.lookup("nu") ) Best, Vaibhav |
|
September 15, 2017, 04:55 |
|
#2 |
New Member
Join Date: Apr 2014
Location: Germany
Posts: 24
Rep Power: 12 |
Hi,
simpleFoam uses transportModels and icoFoam doesn't. That is why in simpleFoam there is something like Code:
singlePhaseTransportModel laminarTransport(U, phi); Best, Moritz |
|
June 28, 2019, 13:54 |
|
#3 |
Senior Member
Andrea
Join Date: Feb 2012
Location: Leeds, UK
Posts: 179
Rep Power: 16 |
Hi,
I understand it's an old thread but I figured it is better to ask here before opening a new one. My understanding is that when we are dealing with simpleFoam and pimpleFoam we can't control directly from createFields.h what is read in from transportProperties since this file is now read when we instantiate our transport model, i.e.: Code:
singlePhaseTransportModel laminarTransport(U, phi); This is different from icoFoam where we read the transportProperties directly from createFields.H. I am adding a passive scalar transport equation to pimpleFoam. The passive scalar equation is: Code:
alphat = turbulence->nut()/Sct; alphat.correctBoundaryConditions(); volScalarField alphaEff("alphaEff", turbulence->nu()/Sc + alphat); fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(alphaEff, T) ); In order to specify the laminar (Sc) and turbulent Schmidt (Sct) numbers for the passive scalar I have created two DimensionedScalar entries in createFields.H,i.e.: Code:
dimensionedScalar Sc ( "Sc", dimless, 0.71 ); dimensionedScalar Sct ( "Sct", dimless, 0.85 ); Everything is working fine with this approach. However it is a bit inconvenient that every time I want to change the values of Sc and Sct I have to do it manually in createFields.H and re-compile my solver. Is there any way to read these two parameters from transportProperties without having to modify the singlePhaseTransportModel class? Many thanks, Andrea |
|
June 28, 2019, 15:09 |
|
#4 |
Senior Member
Andrea
Join Date: Feb 2012
Location: Leeds, UK
Posts: 179
Rep Power: 16 |
I have actually managed to do achieve this by using:
Code:
// Schmidt number dimensionedScalar Sc("Sc", dimless, laminarTransport); // Turbulent Schmidt number dimensionedScalar Prt("Sct", dimless, laminarTransport); Code:
singlePhaseTransportModel laminarTransport(U, phi); |
|
August 27, 2020, 11:08 |
|
#5 | |
New Member
Ran Yi
Join Date: May 2019
Posts: 9
Rep Power: 7 |
Hi,
In this case, the value of Sc or Sct are given in the transportProperties just like nu? Please correct me if I'm wrong. Thanks, Ran Quote:
|
||
August 27, 2020, 17:45 |
|
#6 |
Senior Member
Andrea
Join Date: Feb 2012
Location: Leeds, UK
Posts: 179
Rep Power: 16 |
Yes, the only difference is that you don't have to specify a dimension set because both Sc and Sct are dimless.
Andrea |
|
Tags |
createfields.h, icofoam, simplefoam, transport properties |
Thread Tools | Search this Thread |
Display Modes | |
|
|