Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry
2010-10-12 14:50:30 +01:00
2 changed files with 1288 additions and 1276 deletions

View File

@ -153,6 +153,12 @@ int main(int argc, char *argv[])
"internalFacesOnly",
"do not convert boundary faces"
);
argList::addBoolOption
(
"updateFields",
"update fields to include new patches:"
" NOTE: updated field values may need to be edited"
);
#include "setRootCase.H"
#include "createTime.H"
@ -235,7 +241,9 @@ int main(int argc, char *argv[])
IOobjectList objects(mesh, runTime.timeName());
// Read vol fields.
if (args.optionFound("updateFields"))
{
Info<< "Reading geometric fields" << nl << endl;
PtrList<volScalarField> vsFlds;
ReadFields(mesh, objects, vsFlds);
@ -267,7 +275,11 @@ int main(int argc, char *argv[])
PtrList<surfaceTensorField> stFlds;
ReadFields(mesh, objects, stFlds);
}
else
{
Info<< "Not updating geometric fields" << nl << endl;
}
// Mesh change container
polyTopoChange meshMod(mesh);

View File

@ -478,10 +478,10 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness
Info<< "kinematicSingleLayer::solveThickness()" << endl;
}
volScalarField rUA = 1.0/UEqn.A();
U_ = rUA*UEqn.H();
volScalarField rAU = 1.0/UEqn.A();
U_ = rAU*UEqn.H();
surfaceScalarField deltarUAf = fvc::interpolate(delta_*rUA);
surfaceScalarField deltarAUf = fvc::interpolate(delta_*rAU);
surfaceScalarField rhof = fvc::interpolate(rho_);
surfaceScalarField phiAdd
@ -500,13 +500,13 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness
(
"phid",
(fvc::interpolate(U_*rho_) & filmRegion_.Sf())
- deltarUAf*phiAdd*rhof
- deltarAUf*phiAdd*rhof
);
constrainFilmField(phid, 0.0);
surfaceScalarField ddrhorUAppf =
fvc::interpolate(delta_)*deltarUAf*rhof*fvc::interpolate(pp);
// constrainFilmField(ddrhorUAppf, 0.0);
surfaceScalarField ddrhorAUppf =
fvc::interpolate(delta_)*deltarAUf*rhof*fvc::interpolate(pp);
// constrainFilmField(ddrhorAUppf, 0.0);
for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++)
{
@ -515,7 +515,7 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness
(
fvm::ddt(rho_, delta_)
+ fvm::div(phid, delta_)
- fvm::laplacian(ddrhorUAppf, delta_)
- fvm::laplacian(ddrhorAUppf, delta_)
==
rhoSp_
);
@ -537,7 +537,7 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness
delta_.max(0.0);
// Update U field
U_ -= fvc::reconstruct(deltarUAf*phiAdd);
U_ -= fvc::reconstruct(deltarAUf*phiAdd);
// Remove any patch-normal components of velocity
U_ -= nHat_*(nHat_ & U_);