Skip to content
Snippets Groups Projects
Commit a7c8d1cf authored by sergio's avatar sergio
Browse files

ENH: changing rhoSimpleFoam to rhothermo and bounding thermo.rho between minRho and maxRho.

Bounding thermo.rho in rhoPorousSimpleFoam.
Changing initial time step in externalSolarLoad tutorial.
Commenting out momemtun source term in steamInjection which causes problems
parent e50108e4
Branches
No related merge requests found
Info<< "Reading thermophysical properties\n" << endl; Info<< "Reading thermophysical properties\n" << endl;
autoPtr<rhoThermo> pThermo
autoPtr<psiThermo> pThermo
( (
psiThermo::New(mesh) rhoThermo::New(mesh)
); );
psiThermo& thermo = pThermo(); rhoThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e"); thermo.validate(args.executable(), "h", "e");
volScalarField rho volScalarField rho
......
{ {
//const volScalarField& psi = thermo.psi();
volScalarField rAU(1.0/UEqn.A()); volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
...@@ -93,6 +95,9 @@ ...@@ -93,6 +95,9 @@
rho = max(rho, rhoMin); rho = max(rho, rhoMin);
rho = min(rho, rhoMax); rho = min(rho, rhoMax);
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
if (!simple.transonic()) if (!simple.transonic())
{ {
rho.relax(); rho.relax();
......
...@@ -109,6 +109,8 @@ if (closedVolume) ...@@ -109,6 +109,8 @@ if (closedVolume)
rho = thermo.rho(); rho = thermo.rho();
rho = max(rho, rhoMin); rho = max(rho, rhoMin);
rho = min(rho, rhoMax); rho = min(rho, rhoMax);
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
if (!simple.transonic()) if (!simple.transonic())
{ {
......
...@@ -86,6 +86,10 @@ ...@@ -86,6 +86,10 @@
rho = thermo.rho(); rho = thermo.rho();
rho = max(rho, rhoMin); rho = max(rho, rhoMin);
rho = min(rho, rhoMax); rho = min(rho, rhoMax);
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
rho.relax(); rho.relax();
Info<< "rho max/min : " Info<< "rho max/min : "
<< max(rho).value() << " " << max(rho).value() << " "
......
...@@ -33,7 +33,7 @@ Description ...@@ -33,7 +33,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "psiThermo.H" #include "rhoThermo.H"
#include "turbulentFluidThermoModel.H" #include "turbulentFluidThermoModel.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "fvOptions.H" #include "fvOptions.H"
......
...@@ -25,7 +25,7 @@ stopAt endTime; ...@@ -25,7 +25,7 @@ stopAt endTime;
endTime 18000; endTime 18000;
deltaT 10; deltaT 1;
writeControl adjustableRunTime; writeControl adjustableRunTime;
...@@ -49,4 +49,8 @@ adjustTimeStep yes; ...@@ -49,4 +49,8 @@ adjustTimeStep yes;
maxCo 15; maxCo 15;
maxDeltaT 10;
maxDi 0.25;
// ************************************************************************* // // ************************************************************************* //
...@@ -43,7 +43,7 @@ options ...@@ -43,7 +43,7 @@ options
} }
} }
} }
/*
momentumSource1 momentumSource1
{ {
type vectorSemiImplicitSource; type vectorSemiImplicitSource;
...@@ -55,11 +55,11 @@ options ...@@ -55,11 +55,11 @@ options
volumeMode absolute; volumeMode absolute;
injectionRateSuSp injectionRateSuSp
{ {
U.steam ((0 1e-1 0) 0); // kg*m/s^2 U.steam ((0 1e-2 0) 0); // kg*m/s^2
} }
} }
} }
*/
energySource1 energySource1
{ {
type scalarSemiImplicitSource; type scalarSemiImplicitSource;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment