Info << "Reading field h" << endl;
areaScalarField h
(
IOobject
"h",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
aMesh
);
Info << "Reading field Us" << endl;
areaVectorField Us
"Us",
edgeScalarField phis
"phis",
IOobject::READ_IF_PRESENT,
fac::interpolate(Us) & aMesh.Le()
edgeScalarField phi2s
"phi2s",
fac::interpolate(h*Us) & aMesh.Le()
const areaVectorField& Ns = aMesh.faceAreaNormals();
areaVectorField Gs = g - Ns*(Ns & g);
areaScalarField Gn = mag(g - Gs);
// Mass source
areaScalarField Sm
"Sm",
IOobject::NO_READ,
IOobject::NO_WRITE
aMesh,
dimensionedScalar("Sm", dimLength/dimTime, 0)
// Mass sink
areaScalarField Sd
"Sd",
dimensionedScalar("Sd", dimLength/dimTime, 0)
areaVectorField Ug
"Sg",
dimensionedVector("Ug", dimVelocity, vector::zero)
// Surface pressure
areaScalarField ps
"ps",
rhol*Gn*h - sigma*fac::laplacian(h)
// Friction factor
areaScalarField dotProduct
aMesh.faceAreaNormals() & (g/mag(g))
Info<< "View factor: min = " << min(dotProduct.internalField())
<< " max = " << max(dotProduct.internalField()) << endl;
areaScalarField manningField
"manningField",
areaScalarField frictionFactor
"frictionFactor",
dimensionedScalar("one", dimless, 0.01)
aMesh.schemesDict().setFluxRequired("h");