Commit cb8b410b authored by sergio's avatar sergio Committed by Andrew Heather
Browse files

BUG: mantis 1397. volSymmTensorField not found for cht problems with two coupled solids

parent 96b7fa8f
......@@ -6,7 +6,7 @@
(
thermo.isotropic()
? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
: -fvm::laplacian(betav*tAnialpha(), h, "laplacian(alpha,h)")
: -fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
)
==
fvOptions(rho, h)
......
......@@ -4,6 +4,7 @@
PtrList<radiation::radiationModel> radiations(solidRegions.size());
PtrList<fv::IOoptionList> solidHeatSources(solidRegions.size());
PtrList<volScalarField> betavSolid(solidRegions.size());
PtrList<volSymmTensorField> aniAlphas(solidRegions.size());
// Populate solid field pointer lists
forAll(solidRegions, i)
......@@ -32,6 +33,38 @@
i,
coordinateSystem::New(solidRegions[i], thermos[i])
);
tmp<volVectorField> tkappaByCp =
thermos[i].Kappa()/thermos[i].Cp();
aniAlphas.set
(
i,
new volSymmTensorField
(
IOobject
(
"Anialpha",
runTime.timeName(),
solidRegions[i],
IOobject::NO_READ,
IOobject::NO_WRITE
),
solidRegions[i],
dimensionedSymmTensor
(
"zero",
tkappaByCp().dimensions(),
symmTensor::zero
),
zeroGradientFvPatchSymmTensorField::typeName
)
);
aniAlphas[i].internalField() =
coordinates[i].R().transformVector(tkappaByCp());
aniAlphas[i].correctBoundaryConditions();
}
IOobject betavSolidIO
......
......@@ -8,37 +8,24 @@
tmp<volScalarField> tcp = thermo.Cp();
const volScalarField& cp = tcp();
tmp<volSymmTensorField> tAnialpha;
tmp<volSymmTensorField> taniAlpha;
if (!thermo.isotropic())
{
volSymmTensorField& aniAlpha = aniAlphas[i];
tmp<volVectorField> tkappaByCp = thermo.Kappa()/cp;
const coordinateSystem& coodSys = coordinates[i];
tAnialpha =
tmp<volSymmTensorField>
(
new volSymmTensorField
(
IOobject
(
"Anialpha",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
tkappaByCp().dimensions(),
zeroGradientFvPatchVectorField::typeName
)
);
volSymmTensorField& Anialpha = tAnialpha();
Anialpha.internalField() = coodSys.R().transformVector(tkappaByCp());
Anialpha.correctBoundaryConditions();
aniAlpha.internalField() =
coodSys.R().transformVector(tkappaByCp());
aniAlpha.correctBoundaryConditions();
taniAlpha = tmp<volSymmTensorField>
(
new volSymmTensorField(aniAlpha)
);
}
volScalarField& h = thermo.he();
const volScalarField& betav = betavSolid[i];
......
......@@ -12,7 +12,7 @@ if (finalIter)
- (
thermo.isotropic()
? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
: fvm::laplacian(betav*tAnialpha(), h, "laplacian(alpha,h)")
: fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
)
==
fvOptions(rho, h)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment