mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -63,11 +63,11 @@ public:
|
||||
//- Store object pointer
|
||||
inline explicit autoPtr(T* = 0);
|
||||
|
||||
//- Construct as copy by transfering pointer to this autoPtr and
|
||||
//- Construct as copy by transferring pointer to this autoPtr and
|
||||
// setting the arguments pointer to NULL
|
||||
inline autoPtr(const autoPtr<T>&);
|
||||
|
||||
//- Construct either by transfering pointer or cloning. Should
|
||||
//- Construct either by transferring pointer or cloning. Should
|
||||
// only be called with type that supports cloning.
|
||||
inline autoPtr(const autoPtr<T>&, const bool reUse);
|
||||
|
||||
|
||||
@ -88,7 +88,17 @@ Foam::porosityModel::porosityModel
|
||||
const word& cellZoneName
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::UpdateableMeshObject, porosityModel>(mesh),
|
||||
regIOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
name_(name),
|
||||
mesh_(mesh),
|
||||
dict_(dict),
|
||||
|
||||
@ -36,7 +36,6 @@ SourceFiles
|
||||
#ifndef porosityModel_H
|
||||
#define porosityModel_H
|
||||
|
||||
#include "MeshObject.H"
|
||||
#include "fvMesh.H"
|
||||
#include "dictionary.H"
|
||||
#include "fvMatricesFwd.H"
|
||||
@ -56,7 +55,7 @@ namespace Foam
|
||||
|
||||
class porosityModel
|
||||
:
|
||||
public MeshObject<fvMesh, UpdateableMeshObject, porosityModel>
|
||||
public regIOobject
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ tmp<volVectorField> laminar::Us() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ".Us",
|
||||
typeName + ":Us",
|
||||
owner_.regionMesh().time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
@ -104,7 +104,7 @@ tmp<volScalarField> laminar::mut() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ".mut",
|
||||
typeName + ":mut",
|
||||
owner_.regionMesh().time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,8 +26,6 @@ License
|
||||
#include "standardPhaseChange.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "specie.H"
|
||||
#include "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(epsilonPatches, i)
|
||||
{
|
||||
label patchI = epsilonPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -237,9 +237,9 @@ void epsilonWallFunctionFvPatchScalarField::calculate
|
||||
|
||||
scalar w = cornerWeights[faceI];
|
||||
|
||||
epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]);
|
||||
epsilon[cellI] += w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]);
|
||||
|
||||
G[cellI] =
|
||||
G[cellI] +=
|
||||
w
|
||||
*(mutw[faceI] + muw[faceI])
|
||||
*magGradUw[faceI]
|
||||
@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& epsilonf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI];
|
||||
epsilonf[faceI] = epsilon[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(omegaPatches, i)
|
||||
{
|
||||
label patchI = omegaPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -244,9 +244,9 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
||||
|
||||
scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]);
|
||||
|
||||
omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
|
||||
G[cellI] =
|
||||
G[cellI] +=
|
||||
w
|
||||
*(mutw[faceI] + muw[faceI])
|
||||
*magGradUw[faceI]
|
||||
@ -481,6 +481,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& omega = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& omegaf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -492,6 +494,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI];
|
||||
omegaf[faceI] = omega[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(epsilonPatches, i)
|
||||
{
|
||||
label patchI = epsilonPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& epsilonf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI];
|
||||
epsilonf[faceI] = epsilon[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(omegaPatches, i)
|
||||
{
|
||||
label patchI = omegaPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -242,9 +242,9 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
||||
|
||||
scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]);
|
||||
|
||||
omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
|
||||
G[cellI] =
|
||||
G[cellI] +=
|
||||
w
|
||||
*(nutw[faceI] + nuw[faceI])
|
||||
*magGradUw[faceI]
|
||||
@ -479,6 +479,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& omega = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& omegaf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -490,6 +492,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI];
|
||||
omegaf[faceI] = omega[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user