Commit e39c1c1d authored by mattijs's avatar mattijs
Browse files

Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

parents 27f70054 8b31f15a
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
);
UEqn().relax();
solve(UEqn() == -fvc::grad(p));
{
fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
- p*fvc::div(phi/fvc::interpolate(rho))
);
hEqn.relax();
hEqn.solve();
thermo.correct();
rho = thermo.rho();
if (!transonic)
{
rho.relax();
}
Info<< "rho max/min : "
<< max(rho).value() << " "
<< min(rho).value() << endl;
}
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField p0 = p;
volScalarField AU = UEqn().A();
......@@ -24,8 +29,8 @@ if (transonic)
+ phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
);
refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
= p.boundaryField()[1];
//refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
// = p.boundaryField()[1];
fvScalarMatrix pEqn
(
......@@ -35,6 +40,7 @@ if (transonic)
+ fvc::div(phid)*p
- fvm::laplacian(rho/AtU, p)
);
//pEqn.relax();
pEqn.setReference(pRefCell, pRefValue);
......
......@@ -57,6 +57,7 @@ int main(int argc, char *argv[])
#include "readSIMPLEControls.H"
p.storePrevIter();
rho.storePrevIter();
if (!transonic)
{
......
......@@ -271,7 +271,7 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::readSamplePoints()
maxDist = magE1;
}
}
e1 = samplePoints[i] - p0;
// Find point that is furthest away from line p0-p1
const point& p1 = samplePoints[index1];
......
......@@ -211,7 +211,8 @@ void Foam::singleCellFvMesh::agglomerateMesh
"singleCellFvMesh::agglomerateMesh(..)"
) << "agglomeration does not create a"
<< " single, non-manifold"
<< " face for agglomeration " << coarseI
<< " face for agglomeration " << myAgglom
<< " on patch " << patchI
<< exit(FatalError);
}
......
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