95 lines
2.1 KiB
C
95 lines
2.1 KiB
C
|
Info<< "Reading field U\n" << endl;
|
||
|
volVectorField U
|
||
|
(
|
||
|
IOobject
|
||
|
(
|
||
|
"U",
|
||
|
runTime.timeName(),
|
||
|
mesh,
|
||
|
IOobject::MUST_READ,
|
||
|
IOobject::AUTO_WRITE
|
||
|
),
|
||
|
mesh
|
||
|
);
|
||
|
|
||
|
volTensorField gradU = fvc::grad(U);
|
||
|
|
||
|
volSymmTensorField epsilon
|
||
|
(
|
||
|
IOobject
|
||
|
(
|
||
|
"epsilon",
|
||
|
runTime.timeName(),
|
||
|
mesh,
|
||
|
IOobject::READ_IF_PRESENT,
|
||
|
IOobject::AUTO_WRITE
|
||
|
),
|
||
|
mesh,
|
||
|
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
|
||
|
);
|
||
|
|
||
|
Info<< "Reading field T\n" << endl;
|
||
|
volScalarField T
|
||
|
(
|
||
|
IOobject
|
||
|
(
|
||
|
"T",
|
||
|
runTime.timeName(),
|
||
|
mesh,
|
||
|
IOobject::MUST_READ,
|
||
|
IOobject::AUTO_WRITE
|
||
|
),
|
||
|
mesh
|
||
|
);
|
||
|
|
||
|
volSymmTensorField sigma
|
||
|
(
|
||
|
IOobject
|
||
|
(
|
||
|
"sigma",
|
||
|
runTime.timeName(),
|
||
|
mesh,
|
||
|
IOobject::READ_IF_PRESENT,
|
||
|
IOobject::AUTO_WRITE
|
||
|
),
|
||
|
mesh,
|
||
|
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
|
||
|
);
|
||
|
|
||
|
volVectorField sigmaExp
|
||
|
(
|
||
|
IOobject
|
||
|
(
|
||
|
"sigmaExp",
|
||
|
runTime.timeName(),
|
||
|
mesh,
|
||
|
IOobject::NO_READ,
|
||
|
IOobject::NO_WRITE
|
||
|
),
|
||
|
mesh,
|
||
|
dimensionedVector("zero", dimensionSet(1,-2,-2,0,0,0,0), vector::zero)
|
||
|
);
|
||
|
|
||
|
//- mechanical properties
|
||
|
rheologyModel rheology(sigma);
|
||
|
|
||
|
volScalarField rho = rheology.rho();
|
||
|
|
||
|
volScalarField mu = rheology.mu();
|
||
|
volScalarField lambda = rheology.lambda();
|
||
|
surfaceScalarField muf = fvc::interpolate(mu, "mu");
|
||
|
surfaceScalarField lambdaf = fvc::interpolate(lambda, "lambda");
|
||
|
|
||
|
surfaceVectorField n = mesh.Sf()/mesh.magSf();
|
||
|
|
||
|
|
||
|
//- thermal properties
|
||
|
Info<< "Reading thermal properties\n" << endl;
|
||
|
thermalModel thermal(T);
|
||
|
|
||
|
volScalarField C = thermal.C();
|
||
|
volScalarField k = thermal.k();
|
||
|
volScalarField threeKalpha = (3*lambda + 2*mu)*thermal.alpha();
|
||
|
volScalarField T0 = thermal.T0();
|
||
|
volScalarField rhoC = rho*C;
|