solidDisplacementFoam: Updated solver to use the temperature field stored in solidDisplacementThermo
This commit is contained in:
@ -15,8 +15,7 @@ if (runTime.writeTime())
|
||||
|
||||
if (thermo.thermalStress())
|
||||
{
|
||||
const volScalarField& T = Tptr();
|
||||
sigma = sigma - I*(rho*threeKalpha*T);
|
||||
sigma = sigma - I*(rho*threeKalpha*thermo.T());
|
||||
}
|
||||
|
||||
volScalarField sigmaEq
|
||||
|
||||
@ -14,30 +14,6 @@ volVectorField D
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
autoPtr<volScalarField> Tptr(nullptr);
|
||||
|
||||
if (thermo.thermalStress())
|
||||
{
|
||||
Info<< "Reading field T\n" << endl;
|
||||
Tptr.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Info<< "Calculating stress field sigmaD\n" << endl;
|
||||
volSymmTensorField sigmaD
|
||||
(
|
||||
|
||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (thermo.thermalStress())
|
||||
{
|
||||
volScalarField& T = Tptr();
|
||||
volScalarField& T = thermo.T();
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(rho, Cp, T)
|
||||
@ -96,8 +96,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (thermo.thermalStress())
|
||||
{
|
||||
const volScalarField& T = Tptr();
|
||||
DEqn += fvc::grad(threeKalpha*T);
|
||||
DEqn += fvc::grad(threeKalpha*thermo.T());
|
||||
}
|
||||
|
||||
fvOptions.constrain(DEqn);
|
||||
|
||||
Reference in New Issue
Block a user