solidDisplacementThermo: Updated adding q and divq functions
This commit is contained in:
@ -6,7 +6,6 @@ const volScalarField& E(thermo.E());
|
||||
const volScalarField& nu(thermo.nu());
|
||||
|
||||
const volScalarField Cp(thermo.Cp());
|
||||
const volScalarField kappa(thermo.kappa());
|
||||
|
||||
Info<< "Calculating Lame's coefficients\n" << endl;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -73,8 +73,9 @@ int main(int argc, char *argv[])
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(rho, Cp, T)
|
||||
== fvm::laplacian(kappa, T)
|
||||
+ fvOptions(rho*Cp, T)
|
||||
+ thermo.divq(T)
|
||||
==
|
||||
fvOptions(rho*Cp, T)
|
||||
);
|
||||
|
||||
fvOptions.constrain(TEqn);
|
||||
|
||||
@ -25,6 +25,9 @@ License
|
||||
|
||||
#include "solidDisplacementThermo.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvmLaplacian.H"
|
||||
#include "fvcSnGrad.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
@ -564,4 +567,18 @@ bool Foam::solidDisplacementThermo::read()
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::solidDisplacementThermo::q() const
|
||||
{
|
||||
return -fvc::interpolate(kappa_)*fvc::snGrad(T());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::solidDisplacementThermo::divq(volScalarField& T) const
|
||||
{
|
||||
return -fvm::laplacian(kappa_, T);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -368,6 +368,12 @@ public:
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Return the heat flux
|
||||
virtual tmp<surfaceScalarField> q() const;
|
||||
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
|
||||
|
||||
//- Update properties
|
||||
virtual void correct();
|
||||
|
||||
Reference in New Issue
Block a user