mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -62,7 +62,10 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
|
||||
// Evaluate the value field from the gradient if the internal field is valid
|
||||
if (&iF && iF.size())
|
||||
{
|
||||
evaluate();
|
||||
scalarField::operator=
|
||||
(
|
||||
patchInternalField() + gradient()/patch().deltaCoeffs()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -176,8 +176,7 @@ ddtCorr
|
||||
(
|
||||
U.mesh(),
|
||||
U.mesh().ddtScheme("ddt(" + U.name() + ')')
|
||||
)().fvcDdtPhiCorr(rho, U, U.mesh().Sf() & Uf);
|
||||
//***HGW fvcDdtUfCorr(rho, U, Uf);
|
||||
)().fvcDdtUfCorr(rho, U, Uf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,7 +45,9 @@ addToRunTimeSelectionTable(extrudeModel, linearNormal, dictionary);
|
||||
linearNormal::linearNormal(const dictionary& dict)
|
||||
:
|
||||
extrudeModel(typeName, dict),
|
||||
thickness_(readScalar(coeffDict_.lookup("thickness")))
|
||||
thickness_(readScalar(coeffDict_.lookup("thickness"))),
|
||||
firstCellThickness_(0),
|
||||
layerPoints_(nLayers_)
|
||||
{
|
||||
if (thickness_ <= 0)
|
||||
{
|
||||
@ -53,6 +55,34 @@ linearNormal::linearNormal(const dictionary& dict)
|
||||
<< "thickness should be positive : " << thickness_
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
coeffDict_.readIfPresent("firstCellThickness", firstCellThickness_);
|
||||
|
||||
if (firstCellThickness_ >= thickness_)
|
||||
{
|
||||
FatalErrorIn("linearNormal(const dictionary&)")
|
||||
<< "firstCellThickness is larger than thickness"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
if (firstCellThickness_ > 0)
|
||||
{
|
||||
layerPoints_[0] = firstCellThickness_;
|
||||
|
||||
for (label layerI = 1; layerI < nLayers_; layerI++)
|
||||
{
|
||||
layerPoints_[layerI] =
|
||||
(thickness_ - layerPoints_[0])
|
||||
*sumThickness(layerI) + layerPoints_[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (label layerI = 0; layerI < nLayers_; layerI++)
|
||||
{
|
||||
layerPoints_[layerI] = thickness_*sumThickness(layerI + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -71,9 +101,7 @@ point linearNormal::operator()
|
||||
const label layer
|
||||
) const
|
||||
{
|
||||
//scalar d = thickness_*layer/nLayers_;
|
||||
scalar d = thickness_*sumThickness(layer);
|
||||
return surfacePoint + d*surfaceNormal;
|
||||
return surfacePoint + layerPoints_[layer - 1]*surfaceNormal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,6 +34,7 @@ Description
|
||||
|
||||
#include "point.H"
|
||||
#include "extrudeModel.H"
|
||||
#include "scalarList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -55,6 +56,13 @@ class linearNormal
|
||||
//- layer thickness
|
||||
scalar thickness_;
|
||||
|
||||
//- first cell thickness
|
||||
scalar firstCellThickness_;
|
||||
|
||||
//- layer cell distibution
|
||||
scalarList layerPoints_;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user