This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/elasticOrthoSolidFoam/createFields.H

81 lines
1.8 KiB
C++
Raw Normal View History

2012-09-11 15:42:55 +00:00
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);
2012-09-11 15:42:55 +00:00
(
IOobject
(
"grad(U)",
2012-09-11 15:42:55 +00:00
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
2012-09-11 15:42:55 +00:00
),
mesh,
dimensionedTensor("zero", dimless, tensor::zero)
2012-09-11 15:42:55 +00:00
);
volSymmTensorField epsilon
(
IOobject
(
"epsilon",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
);
volSymmTensorField sigma
(
IOobject
(
"sigma",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
);
volVectorField divSigmaExp
(
2012-09-11 15:42:55 +00:00
IOobject
(
"divSigmaExp",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
2012-09-11 15:42:55 +00:00
mesh,
dimensionedVector("zero", dimForce/dimVolume, vector::zero)
);
2012-09-11 15:42:55 +00:00
//- rheology
constitutiveModel rheology(sigma, U);
volSymmTensor4thOrderField C = rheology.C();
surfaceSymmTensor4thOrderField Cf = fvc::interpolate(C, "C");
volDiagTensorField K = rheology.K();
surfaceDiagTensorField Kf = fvc::interpolate(K, "K");
volScalarField rho = rheology.rho();
2012-09-11 15:42:55 +00:00
surfaceVectorField n = mesh.Sf()/mesh.magSf();