mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -124,7 +124,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -114,7 +114,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -86,7 +86,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = thermo.rho();
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -114,7 +114,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -99,12 +99,14 @@ int main(int argc, char *argv[])
|
|||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -101,7 +101,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -246,11 +246,9 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
|
|||||||
{
|
{
|
||||||
pr *= pow(cr, exp - 1.0);
|
pr *= pow(cr, exp - 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pf*cf - pr*cr;
|
return pf*cf - pr*cr;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -468,10 +466,27 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
|
|||||||
this->thermo().rho()
|
this->thermo().rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
label nCells = rho.size();
|
tmp<volScalarField> tsource
|
||||||
label nReaction = reactions_.size();
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tc",
|
||||||
|
this->time().timeName(),
|
||||||
|
this->mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
this->mesh(),
|
||||||
|
dimensionedScalar("zero", dimTime, SMALL),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
scalarField t(nCells, SMALL);
|
scalarField& t = tsource();
|
||||||
|
|
||||||
|
label nReaction = reactions_.size();
|
||||||
|
|
||||||
if (this->chemistry_)
|
if (this->chemistry_)
|
||||||
{
|
{
|
||||||
@ -509,25 +524,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<volScalarField> tsource
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"tc",
|
|
||||||
this->mesh_.time().timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedScalar("zero", dimTime, 0.0),
|
|
||||||
zeroGradientFvPatchScalarField::typeName
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
tsource().internalField() = t;
|
|
||||||
tsource().correctBoundaryConditions();
|
tsource().correctBoundaryConditions();
|
||||||
|
|
||||||
return tsource;
|
return tsource;
|
||||||
@ -682,7 +679,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
|
|||||||
|
|
||||||
forAll(rho, celli)
|
forAll(rho, celli)
|
||||||
{
|
{
|
||||||
for (label i=0; i<nSpecie(); i++)
|
for (label i=0; i<nSpecie_; i++)
|
||||||
{
|
{
|
||||||
RR_[i][celli] = 0.0;
|
RR_[i][celli] = 0.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Class
|
|||||||
Foam::rhoChemistryModel
|
Foam::rhoChemistryModel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Chemistry model for compressibility-based thermodynamics
|
Chemistry model for density-based thermodynamics
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
rhoChemistryModelI.H
|
rhoChemistryModelI.H
|
||||||
|
|||||||
Reference in New Issue
Block a user