mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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
This commit is contained in:
@ -1,10 +1,9 @@
|
|||||||
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
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
//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 @@
|
|||||||
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)
|
|||||||
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 @@
|
|||||||
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
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#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;
|
|||||||
|
|
||||||
endTime 18000;
|
endTime 18000;
|
||||||
|
|
||||||
deltaT 10;
|
deltaT 1;
|
||||||
|
|
||||||
writeControl adjustableRunTime;
|
writeControl adjustableRunTime;
|
||||||
|
|
||||||
@ -49,4 +49,8 @@ adjustTimeStep yes;
|
|||||||
|
|
||||||
maxCo 15;
|
maxCo 15;
|
||||||
|
|
||||||
|
maxDeltaT 10;
|
||||||
|
|
||||||
|
maxDi 0.25;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -43,7 +43,7 @@ options
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
momentumSource1
|
momentumSource1
|
||||||
{
|
{
|
||||||
type vectorSemiImplicitSource;
|
type vectorSemiImplicitSource;
|
||||||
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user