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", "internalFacesOnly",
"do not convert boundary faces" "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 "setRootCase.H"
#include "createTime.H" #include "createTime.H"
@ -235,7 +241,9 @@ int main(int argc, char *argv[])
IOobjectList objects(mesh, runTime.timeName()); IOobjectList objects(mesh, runTime.timeName());
// Read vol fields. // Read vol fields.
if (args.optionFound("updateFields"))
{
Info<< "Reading geometric fields" << nl << endl;
PtrList<volScalarField> vsFlds; PtrList<volScalarField> vsFlds;
ReadFields(mesh, objects, vsFlds); ReadFields(mesh, objects, vsFlds);
@ -267,7 +275,11 @@ int main(int argc, char *argv[])
PtrList<surfaceTensorField> stFlds; PtrList<surfaceTensorField> stFlds;
ReadFields(mesh, objects, stFlds); ReadFields(mesh, objects, stFlds);
}
else
{
Info<< "Not updating geometric fields" << nl << endl;
}
// Mesh change container // Mesh change container
polyTopoChange meshMod(mesh); polyTopoChange meshMod(mesh);

View File

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