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/elasticOrthoNonLinULSolidFoam/createFields.H

119 lines
2.8 KiB
C++
Raw Normal View History

Info<< "Reading incremental displacement field DU\n" << endl;
2012-09-11 15:42:55 +00:00
volVectorField DU
(
IOobject
(
"DU",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volTensorField gradDU = fvc::grad(DU);
Info<< "Reading accumulated displacement field U\n" << endl;
2012-09-11 15:42:55 +00:00
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedVector("zero", dimLength, vector::zero)
2012-09-11 15:42:55 +00:00
);
Info << "Reading accumulated strain field epsilon\n" << endl;
volSymmTensorField epsilon
2012-09-11 15:42:55 +00:00
(
IOobject
(
"epsilon",
2012-09-11 15:42:55 +00:00
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
);
volSymmTensorField DEpsilon
2012-09-11 15:42:55 +00:00
(
IOobject
(
"DEpsilon",
2012-09-11 15:42:55 +00:00
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
);
Info << "Reading accumulated stress field sigma\n" << endl;
volSymmTensorField sigma
2012-09-11 15:42:55 +00:00
(
IOobject
(
"sigma",
2012-09-11 15:42:55 +00:00
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
);
Info << "Reading incremental stress field DSigma\n" << endl;
volSymmTensorField DSigma
2012-09-11 15:42:55 +00:00
(
IOobject
(
"DSigma",
2012-09-11 15:42:55 +00:00
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
);
//- material properties
constitutiveModel rheology(sigma, DU);
volSymmTensor4thOrderField C = rheology.C();
volDiagTensorField K = rheology.K();
//surfaceSymmTensor4thOrderField Cf = fvc::interpolate(C);
//surfaceDiagTensorField Kf = fvc::interpolate(K);
surfaceVectorField n = mesh.Sf()/mesh.magSf();
//volScalarField rho = rheology.rho();
volScalarField rho
(
2012-09-11 15:42:55 +00:00
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
rheology.rho()
);
2012-09-11 15:42:55 +00:00
// if(rheology.planeStress())
// {
// Info << nl << "Plane stress is set to yes -> the zz stress will be zero" << nl << endl;
// }