ENH: CHT solvers - updated equation sources

This commit is contained in:
andy
2012-12-06 13:30:29 +00:00
parent 8f76549b1d
commit 9226110172
8 changed files with 18 additions and 15 deletions

View File

@ -36,7 +36,6 @@ Description
#include "regionProperties.H" #include "regionProperties.H"
#include "solidThermo.H" #include "solidThermo.H"
#include "radiationModel.H" #include "radiationModel.H"
#include "IOporosityModelList.H"
#include "IObasicSourceList.H" #include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -16,6 +16,9 @@
); );
EEqn.relax(); EEqn.relax();
sources.constrain(EEqn);
EEqn.solve(); EEqn.solve();
thermo.correct(); thermo.correct();

View File

@ -3,13 +3,13 @@
( (
fvm::div(phi, U) fvm::div(phi, U)
+ turb.divDevRhoReff(U) + turb.divDevRhoReff(U)
+ sources(rho, U) ==
sources(rho, U)
); );
UEqn().relax(); UEqn().relax();
// Add porous resistance sources.constrain(UEqn());
pZones.addResistance(UEqn());
solve solve
( (

View File

@ -18,7 +18,6 @@
PtrList<dimensionedScalar> rhoMin(fluidRegions.size()); PtrList<dimensionedScalar> rhoMin(fluidRegions.size());
PtrList<IObasicSourceList> heatSources(fluidRegions.size()); PtrList<IObasicSourceList> heatSources(fluidRegions.size());
PtrList<IOporosityModelList> porousZonesFluid(fluidRegions.size());
// Populate fluid field pointer lists // Populate fluid field pointer lists
forAll(fluidRegions, i) forAll(fluidRegions, i)
@ -200,13 +199,6 @@
i, i,
new IObasicSourceList(fluidRegions[i]) new IObasicSourceList(fluidRegions[i])
); );
Info<< " Adding porous zones\n" << endl;
porousZonesFluid.set
(
i,
new IOporosityModelList(fluidRegions[i])
);
} }

View File

@ -23,6 +23,8 @@
phiHbyA += phig; phiHbyA += phig;
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
dimensionedScalar compressibility = fvc::domainIntegrate(psi); dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL); bool compressible = (compressibility.value() > SMALL);
@ -54,6 +56,7 @@
// calculated from the relaxed pressure // calculated from the relaxed pressure
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf); U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U);
} }
} }

View File

@ -14,8 +14,6 @@
IObasicSourceList& sources = heatSources[i]; IObasicSourceList& sources = heatSources[i];
const IOporosityModelList& pZones = porousZonesFluid[i];
const dimensionedScalar initialMass const dimensionedScalar initialMass
( (
"initialMass", "initialMass",

View File

@ -24,6 +24,8 @@
+ phig + phig
); );
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
{ {
fvScalarMatrix p_rghDDtEqn fvScalarMatrix p_rghDDtEqn
( (
@ -64,6 +66,7 @@
U = HbyA U = HbyA
+ rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U);
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
} }
} }

View File

@ -10,9 +10,14 @@ if (finalIter)
( (
fvm::ddt(betav*rho, h) fvm::ddt(betav*rho, h)
- fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)") - fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)")
+ sources(rho, h) ==
sources(rho, h)
); );
hEqn().relax(); hEqn().relax();
sources.constrain(hEqn());
hEqn().solve(mesh.solver(h.select(finalIter))); hEqn().solve(mesh.solver(h.select(finalIter)));
} }
} }