Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
6ea2041122
14
doc/Build.md
14
doc/Build.md
@ -1,23 +1,23 @@
|
|||||||
## Getting the code
|
## Getting the code
|
||||||
|
|
||||||
Links to all code packs are available on https://dl.openfoam.com. For OpenFOAM-v2212:
|
Links to all code packs are available on https://dl.openfoam.com. For OpenFOAM-v2306:
|
||||||
|
|
||||||
- https://dl.openfoam.com/source/latest/
|
- https://dl.openfoam.com/source/latest/
|
||||||
- Source: https://dl.openfoam.com/source/v2212/OpenFOAM-v2212.tgz
|
- Source: https://dl.openfoam.com/source/v2306/OpenFOAM-v2306.tgz
|
||||||
- ThirdParty: https://dl.openfoam.com/source/v2212/ThirdParty-v2212.tgz
|
- ThirdParty: https://dl.openfoam.com/source/v2306/ThirdParty-v2306.tgz
|
||||||
|
|
||||||
## OpenFOAM® Quick Build Guide
|
## OpenFOAM® Quick Build Guide
|
||||||
|
|
||||||
Prior to building, ensure that the [system requirements][link openfoam-require]
|
Prior to building, ensure that the [system requirements][link openfoam-require]
|
||||||
are satisfied (including any special [cross-compiling][wiki-cross-compile]
|
are satisfied (including any special [cross-compiling][wiki-cross-compile]
|
||||||
considerations), and source the correct OpenFOAM environment.
|
considerations), and source the correct OpenFOAM environment.
|
||||||
For example, for the OpenFOAM-v2212 version:
|
For example, for the OpenFOAM-v2306 version:
|
||||||
```
|
```
|
||||||
source <installation path>/OpenFOAM-v2212/etc/bashrc
|
source <installation path>/OpenFOAM-v2306/etc/bashrc
|
||||||
```
|
```
|
||||||
e.g. if installed under the `~/openfoam` directory
|
e.g. if installed under the `~/openfoam` directory
|
||||||
```
|
```
|
||||||
source ~/openfoam/OpenFOAM-v2212/etc/bashrc
|
source ~/openfoam/OpenFOAM-v2306/etc/bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -157,4 +157,4 @@ More details in the [ThirdParty build guide][link third-build].
|
|||||||
[wiki-config]: https://develop.openfoam.com/Development/openfoam/-/wikis/configuring
|
[wiki-config]: https://develop.openfoam.com/Development/openfoam/-/wikis/configuring
|
||||||
|
|
||||||
---
|
---
|
||||||
Copyright 2019-2022 OpenCFD Ltd
|
Copyright 2019-2023 OpenCFD Ltd
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
# [WM_PROJECT_VERSION] - A human-readable version name
|
# [WM_PROJECT_VERSION] - A human-readable version name
|
||||||
# A development version is often named 'com' - as in www.openfoam.com
|
# A development version is often named 'com' - as in www.openfoam.com
|
||||||
export WM_PROJECT_VERSION=com
|
export WM_PROJECT_VERSION=v2306
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Configuration environment variables.
|
# Configuration environment variables.
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
# [WM_PROJECT_VERSION] - A human-readable version name
|
# [WM_PROJECT_VERSION] - A human-readable version name
|
||||||
# A development version is often named 'com' - as in www.openfoam.com
|
# A development version is often named 'com' - as in www.openfoam.com
|
||||||
setenv WM_PROJECT_VERSION com
|
setenv WM_PROJECT_VERSION v2306
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Configuration environment variables.
|
# Configuration environment variables.
|
||||||
|
@ -96,7 +96,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
this->coeffDict().subDict("sizeDistribution"), owner.rndGen()
|
this->coeffDict().subDict("sizeDistribution"), owner.rndGen()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
nInjected_(this->parcelsAddedTotal()),
|
nInjected_(Pstream::master() ? this->parcelsAddedTotal() : 0),
|
||||||
injectorOrder_(identity(positionAxis_.size())),
|
injectorOrder_(identity(positionAxis_.size())),
|
||||||
tanVec1_(),
|
tanVec1_(),
|
||||||
tanVec2_()
|
tanVec2_()
|
||||||
@ -233,7 +233,7 @@ Foam::label Foam::ConeInjection<CloudType>::parcelsToInject
|
|||||||
const label targetParcels =
|
const label targetParcels =
|
||||||
ceil(positionAxis_.size()*parcelsPerInjector_*volumeFraction);
|
ceil(positionAxis_.size()*parcelsPerInjector_*volumeFraction);
|
||||||
|
|
||||||
return targetParcels - nInjected_;
|
return targetParcels - returnReduce(nInjected_, sumOp<label>());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -614,6 +614,12 @@ void Foam::advancingFrontAMI::write(Ostream& os) const
|
|||||||
faceAreaIntersect::triangulationModeNames_[faceAreaIntersect::tmMesh],
|
faceAreaIntersect::triangulationModeNames_[faceAreaIntersect::tmMesh],
|
||||||
faceAreaIntersect::triangulationModeNames_[triMode_]
|
faceAreaIntersect::triangulationModeNames_[triMode_]
|
||||||
);
|
);
|
||||||
|
os.writeEntryIfDifferent<word>
|
||||||
|
(
|
||||||
|
"areaNormalisationMode",
|
||||||
|
areaNormalisationModeNames_[areaNormalisationMode::project],
|
||||||
|
areaNormalisationModeNames_[areaNormalisationMode_]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -382,8 +382,8 @@ void Foam::cyclicAMIPolyPatch::resetAMI(const UList<point>& points) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cyclicAMIPolyPatch& nbr = neighbPatch();
|
const cyclicAMIPolyPatch& nbr = neighbPatch();
|
||||||
pointField srcPoints(localPoints());
|
const pointField srcPoints(points, meshPoints());
|
||||||
pointField nbrPoints(nbr.localPoints());
|
pointField nbrPoints(points, nbr.meshPoints());
|
||||||
|
|
||||||
Info<< "AMI: Creating AMI for source:" << name()
|
Info<< "AMI: Creating AMI for source:" << name()
|
||||||
<< " and target:" << nbr.name() << endl;
|
<< " and target:" << nbr.name() << endl;
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
|
<<<<<<< HEAD
|
||||||
Copyright (C) 2019-2023 OpenCFD Ltd.
|
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||||
|
=======
|
||||||
|
Copyright (C) 2019-202i3 OpenCFD Ltd.
|
||||||
|
>>>>>>> origin/master
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -38,8 +42,7 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmModelType&
|
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmModelType&
|
||||||
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::
|
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmModel() const
|
||||||
filmModel() const
|
|
||||||
{
|
{
|
||||||
typedef filmModelType ModelType;
|
typedef filmModelType ModelType;
|
||||||
|
|
||||||
@ -73,8 +76,7 @@ filmModel() const
|
|||||||
|
|
||||||
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::
|
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::
|
||||||
pyrolysisModelType&
|
pyrolysisModelType&
|
||||||
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::
|
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::pyrModel() const
|
||||||
pyrModel() const
|
|
||||||
{
|
{
|
||||||
typedef pyrolysisModelType ModelType;
|
typedef pyrolysisModelType ModelType;
|
||||||
|
|
||||||
@ -241,13 +243,9 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::rmap
|
|||||||
{
|
{
|
||||||
mixedFvPatchScalarField::rmap(ptf, addr);
|
mixedFvPatchScalarField::rmap(ptf, addr);
|
||||||
|
|
||||||
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField& tiptf =
|
const auto& fpptf = refCast<const myType>(ptf);
|
||||||
refCast
|
|
||||||
<
|
|
||||||
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
|
||||||
>(ptf);
|
|
||||||
|
|
||||||
temperatureCoupledBase::rmap(tiptf, addr);
|
temperatureCoupledBase::rmap(fpptf, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -259,8 +257,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the coupling information from the mappedPatchBase
|
// Get the coupling information from the mappedPatchBase
|
||||||
const mappedPatchBase& mpp =
|
const auto& mpp = refCast<const mappedPatchBase>(patch().patch());
|
||||||
refCast<const mappedPatchBase>(patch().patch());
|
|
||||||
|
|
||||||
const label patchi = patch().index();
|
const label patchi = patch().index();
|
||||||
const label nbrPatchi = mpp.samplePolyPatch().index();
|
const label nbrPatchi = mpp.samplePolyPatch().index();
|
||||||
@ -272,10 +269,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
scalarField intFld(patchInternalField());
|
scalarField intFld(patchInternalField());
|
||||||
|
|
||||||
const auto& nbrField =
|
const auto& nbrField =
|
||||||
refCast
|
refCast<const myType>
|
||||||
<
|
|
||||||
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
|
||||||
>
|
|
||||||
(
|
(
|
||||||
nbrPatch.lookupPatchField<volScalarField>(TnbrName_)
|
nbrPatch.lookupPatchField<volScalarField>(TnbrName_)
|
||||||
);
|
);
|
||||||
@ -293,7 +287,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
scalarField KDeltaNbr(nbrK*nbrPatch.deltaCoeffs());
|
scalarField KDeltaNbr(nbrK*nbrPatch.deltaCoeffs());
|
||||||
mpp.distribute(KDeltaNbr);
|
mpp.distribute(KDeltaNbr);
|
||||||
|
|
||||||
scalarField myKDelta(K*patch().deltaCoeffs());
|
const scalarField myKDelta(K*patch().deltaCoeffs());
|
||||||
|
|
||||||
scalarList Tfilm(patch().size(), Zero);
|
scalarList Tfilm(patch().size(), Zero);
|
||||||
scalarList htcwfilm(patch().size(), Zero);
|
scalarList htcwfilm(patch().size(), Zero);
|
||||||
@ -306,32 +300,19 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
scalarField qr(patch().size(), Zero);
|
scalarField qr(patch().size(), Zero);
|
||||||
|
|
||||||
label coupledPatchi = -1;
|
label coupledPatchi = -1;
|
||||||
|
label filmPatchi = -1;
|
||||||
if (pyrolysisRegionName_ == mesh.name())
|
if (pyrolysisRegionName_ == mesh.name())
|
||||||
{
|
{
|
||||||
|
// Working on the pyrolysis mesh
|
||||||
|
|
||||||
coupledPatchi = patchi;
|
coupledPatchi = patchi;
|
||||||
if (qrName_ != "none")
|
if (qrName_ != "none")
|
||||||
{
|
{
|
||||||
qr = nbrPatch.lookupPatchField<volScalarField>(qrName_);
|
qr = nbrPatch.lookupPatchField<volScalarField>(qrName_);
|
||||||
mpp.distribute(qr);
|
mpp.distribute(qr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (pyrolysis.primaryMesh().name() == mesh.name())
|
|
||||||
{
|
|
||||||
coupledPatchi = nbrPatch.index();
|
|
||||||
if (qrName_ != "none")
|
|
||||||
{
|
|
||||||
qr = patch().lookupPatchField<volScalarField>(qrName_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< type() << " condition is intended to be applied to either the "
|
|
||||||
<< "primary or pyrolysis regions only"
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
const label filmPatchi = pyrolysis.nbrCoupledPatchID(film, coupledPatchi);
|
filmPatchi = pyrolysis.nbrCoupledPatchID(film, coupledPatchi);
|
||||||
|
|
||||||
const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchi]);
|
const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchi]);
|
||||||
|
|
||||||
@ -346,11 +327,18 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Obtain Tfilm at the boundary through Ts.
|
// Obtain Tfilm at the boundary through Ts.
|
||||||
// NOTE: Tf is not good as at the boundary it will retrieve Tp
|
// NOTE: Tf is not good as at the boundary it will retrieve Tp
|
||||||
Tfilm = film.Ts().boundaryField()[filmPatchi];
|
const scalarField Ts(film.Ts().boundaryField()[filmPatchi]);
|
||||||
film.toPrimary(filmPatchi, Tfilm);
|
Tfilm =
|
||||||
|
pyrolysis.mapRegionPatchField
|
||||||
|
(
|
||||||
|
film,
|
||||||
|
coupledPatchi,
|
||||||
|
filmPatchi,
|
||||||
|
Ts,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Obtain delta
|
// Obtain delta
|
||||||
filmDelta =
|
filmDelta =
|
||||||
@ -361,9 +349,40 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
coupledPatchi,
|
coupledPatchi,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else if (pyrolysis.primaryMesh().name() == mesh.name())
|
||||||
|
{
|
||||||
|
// Working on the primary mesh
|
||||||
|
|
||||||
|
coupledPatchi = nbrPatch.index();
|
||||||
|
if (qrName_ != "none")
|
||||||
|
{
|
||||||
|
qr = patch().lookupPatchField<volScalarField>(qrName_);
|
||||||
|
}
|
||||||
|
|
||||||
|
filmPatchi = pyrolysis.nbrCoupledPatchID(film, coupledPatchi);
|
||||||
|
|
||||||
|
htcwfilm = film.htcw().h()().boundaryField()[filmPatchi];
|
||||||
|
film.toPrimary(filmPatchi, htcwfilm);
|
||||||
|
|
||||||
|
// Obtain Tfilm at the boundary through Ts.
|
||||||
|
// NOTE: Tf is not good as at the boundary it will retrieve Tp
|
||||||
|
Tfilm = film.Ts().boundaryField()[filmPatchi];
|
||||||
|
film.toPrimary(filmPatchi, Tfilm);
|
||||||
|
|
||||||
|
filmDelta = film.delta().boundaryField()[filmPatchi];
|
||||||
|
film.toPrimary(filmPatchi, filmDelta);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< type() << " condition is intended to be applied to either the "
|
||||||
|
<< "primary or pyrolysis regions only"
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
// Estimate wetness of the film (1: wet , 0: dry)
|
// Estimate wetness of the film (1: wet , 0: dry)
|
||||||
scalarField ratio
|
const scalarField ratio
|
||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
@ -376,14 +395,11 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalarField qConv(ratio*htcwfilm*(Tfilm - Tp)*convectiveScaling_);
|
const scalarField qConv(ratio*htcwfilm*(Tfilm - Tp)*convectiveScaling_);
|
||||||
|
const scalarField qRad((1.0 - ratio)*qr);
|
||||||
scalarField qRad((1.0 - ratio)*qr);
|
const scalarField alpha(KDeltaNbr - (qRad + qConv)/Tp);
|
||||||
|
|
||||||
scalarField alpha(KDeltaNbr - (qRad + qConv)/Tp);
|
|
||||||
|
|
||||||
valueFraction() = alpha/(alpha + (1.0 - ratio)*myKDelta);
|
valueFraction() = alpha/(alpha + (1.0 - ratio)*myKDelta);
|
||||||
|
|
||||||
refValue() = ratio*Tfilm + (1.0 - ratio)*(KDeltaNbr*nbrIntFld)/alpha;
|
refValue() = ratio*Tfilm + (1.0 - ratio)*(KDeltaNbr*nbrIntFld)/alpha;
|
||||||
|
|
||||||
mixedFvPatchScalarField::updateCoeffs();
|
mixedFvPatchScalarField::updateCoeffs();
|
||||||
|
@ -110,6 +110,8 @@ public:
|
|||||||
typedef Foam::regionModels::pyrolysisModels::pyrolysisModel
|
typedef Foam::regionModels::pyrolysisModels::pyrolysisModel
|
||||||
pyrolysisModelType;
|
pyrolysisModelType;
|
||||||
|
|
||||||
|
typedef filmPyrolysisRadiativeCoupledMixedFvPatchScalarField myType;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ solvers
|
|||||||
"pcorr.*"
|
"pcorr.*"
|
||||||
{
|
{
|
||||||
solver GAMG;
|
solver GAMG;
|
||||||
smoother GaussSeidel;
|
smoother DICGaussSeidel;
|
||||||
cacheAgglomeration no;
|
cacheAgglomeration no;
|
||||||
tolerance 0.02;
|
tolerance 0.02;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user