mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,6 +58,8 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
using namespace interfaceCompositionModels;
|
using namespace interfaceCompositionModels;
|
||||||
|
|
||||||
|
// Gas-side models
|
||||||
|
|
||||||
// multi-component gas in the presence of a pure liquid
|
// multi-component gas in the presence of a pure liquid
|
||||||
makeInterfaceCompositionType
|
makeInterfaceCompositionType
|
||||||
(
|
(
|
||||||
@ -99,6 +101,46 @@ namespace Foam
|
|||||||
multiComponentMixture,
|
multiComponentMixture,
|
||||||
constFluidEThermoPhysics
|
constFluidEThermoPhysics
|
||||||
);
|
);
|
||||||
|
makeSpecieInterfaceCompositionType
|
||||||
|
(
|
||||||
|
NonRandomTwoLiquid,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constGasEThermoPhysics,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constFluidEThermoPhysics
|
||||||
|
);
|
||||||
|
|
||||||
|
// reacting gas in the presence of a multi-component liquid
|
||||||
|
makeSpecieInterfaceCompositionType
|
||||||
|
(
|
||||||
|
Saturated,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
reactingMixture,
|
||||||
|
constGasEThermoPhysics,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constFluidEThermoPhysics
|
||||||
|
);
|
||||||
|
makeSpecieInterfaceCompositionType
|
||||||
|
(
|
||||||
|
NonRandomTwoLiquid,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
reactingMixture,
|
||||||
|
constGasEThermoPhysics,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constFluidEThermoPhysics
|
||||||
|
);
|
||||||
|
|
||||||
|
// Liquid-side models
|
||||||
|
|
||||||
// multi-component liquid in the presence of a multi-component gas
|
// multi-component liquid in the presence of a multi-component gas
|
||||||
makeSpecieInterfaceCompositionType
|
makeSpecieInterfaceCompositionType
|
||||||
@ -113,6 +155,44 @@ namespace Foam
|
|||||||
multiComponentMixture,
|
multiComponentMixture,
|
||||||
constGasEThermoPhysics
|
constGasEThermoPhysics
|
||||||
);
|
);
|
||||||
|
makeSpecieInterfaceCompositionType
|
||||||
|
(
|
||||||
|
Raoult,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constFluidEThermoPhysics,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constGasEThermoPhysics
|
||||||
|
);
|
||||||
|
|
||||||
|
// multi-component liquid in the presence of a reacting gas
|
||||||
|
makeSpecieInterfaceCompositionType
|
||||||
|
(
|
||||||
|
Henry,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constFluidEThermoPhysics,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
reactingMixture,
|
||||||
|
constGasEThermoPhysics
|
||||||
|
);
|
||||||
|
makeSpecieInterfaceCompositionType
|
||||||
|
(
|
||||||
|
Raoult,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
multiComponentMixture,
|
||||||
|
constFluidEThermoPhysics,
|
||||||
|
heRhoThermo,
|
||||||
|
rhoReactionThermo,
|
||||||
|
reactingMixture,
|
||||||
|
constGasEThermoPhysics
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -155,7 +155,7 @@ update
|
|||||||
const volScalarField& Tf
|
const volScalarField& Tf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
volScalarField W(this->thermo_.composition().W());
|
volScalarField W(this->thermo_.W());
|
||||||
|
|
||||||
volScalarField X1
|
volScalarField X1
|
||||||
(
|
(
|
||||||
|
|||||||
@ -110,7 +110,7 @@ class NonRandomTwoLiquid
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("NonRandomTwoLiquid");
|
TypeName("nonRandomTwoLiquid");
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("Saturated");
|
TypeName("saturated");
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ executeControl writeTime;
|
|||||||
writeControl writeTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
setFormat vtk;
|
setFormat vtk;
|
||||||
trackForward true;
|
direction forward;
|
||||||
|
|
||||||
lifeTime 10000;
|
lifeTime 10000;
|
||||||
nSubCycle 5;
|
nSubCycle 5;
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace Foam
|
|||||||
class cyclicGAMGInterfaceField
|
class cyclicGAMGInterfaceField
|
||||||
:
|
:
|
||||||
public GAMGInterfaceField,
|
public GAMGInterfaceField,
|
||||||
virtual public cyclicLduInterfaceField
|
public cyclicLduInterfaceField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
class cyclicGAMGInterface
|
class cyclicGAMGInterface
|
||||||
:
|
:
|
||||||
public GAMGInterface,
|
public GAMGInterface,
|
||||||
virtual public cyclicLduInterface
|
public cyclicLduInterface
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -88,7 +88,6 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
|
|||||||
const porousBafflePressureFvPatchField& ptf
|
const porousBafflePressureFvPatchField& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicLduInterfaceField(),
|
|
||||||
fixedJumpFvPatchField<scalar>(ptf),
|
fixedJumpFvPatchField<scalar>(ptf),
|
||||||
phiName_(ptf.phiName_),
|
phiName_(ptf.phiName_),
|
||||||
rhoName_(ptf.rhoName_),
|
rhoName_(ptf.rhoName_),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,6 +78,7 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
||||||
|
cyclicLduInterfaceField(),
|
||||||
cyclicPatch_(refCast<const cyclicFvPatch>(p))
|
cyclicPatch_(refCast<const cyclicFvPatch>(p))
|
||||||
{
|
{
|
||||||
if (!isA<cyclicFvPatch>(this->patch()))
|
if (!isA<cyclicFvPatch>(this->patch()))
|
||||||
@ -98,8 +99,8 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
|||||||
const cyclicFvPatchField<Type>& ptf
|
const cyclicFvPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicLduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(ptf),
|
coupledFvPatchField<Type>(ptf),
|
||||||
|
cyclicLduInterfaceField(),
|
||||||
cyclicPatch_(ptf.cyclicPatch_)
|
cyclicPatch_(ptf.cyclicPatch_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -112,6 +113,7 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
coupledFvPatchField<Type>(ptf, iF),
|
coupledFvPatchField<Type>(ptf, iF),
|
||||||
|
cyclicLduInterfaceField(),
|
||||||
cyclicPatch_(ptf.cyclicPatch_)
|
cyclicPatch_(ptf.cyclicPatch_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -69,8 +69,8 @@ namespace Foam
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class cyclicFvPatchField
|
class cyclicFvPatchField
|
||||||
:
|
:
|
||||||
virtual public cyclicLduInterfaceField,
|
public coupledFvPatchField<Type>,
|
||||||
public coupledFvPatchField<Type>
|
public cyclicLduInterfaceField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,8 +35,8 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicACMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(p, iF),
|
coupledFvPatchField<Type>(p, iF),
|
||||||
|
cyclicACMILduInterfaceField(),
|
||||||
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -49,8 +49,8 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicACMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(p, iF, dict, dict.found("value")),
|
coupledFvPatchField<Type>(p, iF, dict, dict.found("value")),
|
||||||
|
cyclicACMILduInterfaceField(),
|
||||||
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
||||||
{
|
{
|
||||||
if (!isA<cyclicACMIFvPatch>(p))
|
if (!isA<cyclicACMIFvPatch>(p))
|
||||||
@ -82,8 +82,8 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicACMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
||||||
|
cyclicACMILduInterfaceField(),
|
||||||
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
||||||
{
|
{
|
||||||
if (!isA<cyclicACMIFvPatch>(this->patch()))
|
if (!isA<cyclicACMIFvPatch>(this->patch()))
|
||||||
@ -105,8 +105,8 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
|||||||
const cyclicACMIFvPatchField<Type>& ptf
|
const cyclicACMIFvPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicACMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(ptf),
|
coupledFvPatchField<Type>(ptf),
|
||||||
|
cyclicACMILduInterfaceField(),
|
||||||
cyclicACMIPatch_(ptf.cyclicACMIPatch_)
|
cyclicACMIPatch_(ptf.cyclicACMIPatch_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -118,8 +118,8 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicACMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(ptf, iF),
|
coupledFvPatchField<Type>(ptf, iF),
|
||||||
|
cyclicACMILduInterfaceField(),
|
||||||
cyclicACMIPatch_(ptf.cyclicACMIPatch_)
|
cyclicACMIPatch_(ptf.cyclicACMIPatch_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,8 +68,8 @@ namespace Foam
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class cyclicACMIFvPatchField
|
class cyclicACMIFvPatchField
|
||||||
:
|
:
|
||||||
virtual public cyclicACMILduInterfaceField,
|
public coupledFvPatchField<Type>,
|
||||||
public coupledFvPatchField<Type>
|
public cyclicACMILduInterfaceField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,8 +32,8 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicAMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(p, iF),
|
coupledFvPatchField<Type>(p, iF),
|
||||||
|
cyclicAMILduInterfaceField(),
|
||||||
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -46,8 +46,8 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicAMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(p, iF, dict, dict.found("value")),
|
coupledFvPatchField<Type>(p, iF, dict, dict.found("value")),
|
||||||
|
cyclicAMILduInterfaceField(),
|
||||||
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
||||||
{
|
{
|
||||||
if (!isA<cyclicAMIFvPatch>(p))
|
if (!isA<cyclicAMIFvPatch>(p))
|
||||||
@ -79,8 +79,8 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicAMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
||||||
|
cyclicAMILduInterfaceField(),
|
||||||
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
||||||
{
|
{
|
||||||
if (!isA<cyclicAMIFvPatch>(this->patch()))
|
if (!isA<cyclicAMIFvPatch>(this->patch()))
|
||||||
@ -101,8 +101,8 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
|||||||
const cyclicAMIFvPatchField<Type>& ptf
|
const cyclicAMIFvPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicAMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(ptf),
|
coupledFvPatchField<Type>(ptf),
|
||||||
|
cyclicAMILduInterfaceField(),
|
||||||
cyclicAMIPatch_(ptf.cyclicAMIPatch_)
|
cyclicAMIPatch_(ptf.cyclicAMIPatch_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -114,8 +114,8 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicAMILduInterfaceField(),
|
|
||||||
coupledFvPatchField<Type>(ptf, iF),
|
coupledFvPatchField<Type>(ptf, iF),
|
||||||
|
cyclicAMILduInterfaceField(),
|
||||||
cyclicAMIPatch_(ptf.cyclicAMIPatch_)
|
cyclicAMIPatch_(ptf.cyclicAMIPatch_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,8 +73,8 @@ namespace Foam
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class cyclicAMIFvPatchField
|
class cyclicAMIFvPatchField
|
||||||
:
|
:
|
||||||
virtual public cyclicAMILduInterfaceField,
|
public coupledFvPatchField<Type>,
|
||||||
public coupledFvPatchField<Type>
|
public cyclicAMILduInterfaceField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,13 @@ namespace functionObjects
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(streamLine, 0);
|
defineTypeNameAndDebug(streamLine, 0);
|
||||||
addToRunTimeSelectionTable(functionObject, streamLine, dictionary);
|
addToRunTimeSelectionTable(functionObject, streamLine, dictionary);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const char* NamedEnum<streamLine::trackDirection, 3>::names[] =
|
||||||
|
{"forward", "backward", "both"};
|
||||||
|
|
||||||
|
const NamedEnum<streamLine::trackDirection, 3>
|
||||||
|
streamLine::trackDirectionNames_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,7 +264,9 @@ void Foam::functionObjects::streamLine::track()
|
|||||||
vsInterp,
|
vsInterp,
|
||||||
vvInterp,
|
vvInterp,
|
||||||
UIndex, // index of U in vvInterp
|
UIndex, // index of U in vvInterp
|
||||||
trackForward_, // track in +u direction?
|
|
||||||
|
trackDirection_ == trackDirection::FORWARD,
|
||||||
|
|
||||||
nSubCycle_, // automatic track control:step through cells in steps?
|
nSubCycle_, // automatic track control:step through cells in steps?
|
||||||
trackLength_, // fixed track length
|
trackLength_, // fixed track length
|
||||||
|
|
||||||
@ -266,13 +275,24 @@ void Foam::functionObjects::streamLine::track()
|
|||||||
allVectors_
|
allVectors_
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Set very large dt. Note: cannot use great since 1/great is small
|
// Set very large dt. Note: cannot use great since 1/great is small
|
||||||
// which is a trigger value for the tracking...
|
// which is a trigger value for the tracking...
|
||||||
const scalar trackTime = Foam::sqrt(great);
|
const scalar trackTime = Foam::sqrt(great);
|
||||||
|
|
||||||
// Track
|
// Track
|
||||||
|
if (trackDirection_ == trackDirection::BOTH)
|
||||||
|
{
|
||||||
|
initialParticles = particles;
|
||||||
|
}
|
||||||
|
|
||||||
particles.move(particles, td, trackTime);
|
particles.move(particles, td, trackTime);
|
||||||
|
|
||||||
|
if (trackDirection_ == trackDirection::BOTH)
|
||||||
|
{
|
||||||
|
particles.IDLList<streamLineParticle>::operator=(initialParticles);
|
||||||
|
td.trackForward_ = !td.trackForward_;
|
||||||
|
particles.move(particles, td, trackTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -321,8 +341,19 @@ bool Foam::functionObjects::streamLine::read(const dictionary& dict)
|
|||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The trackForward entry is maintained here for backwards compatibility
|
||||||
|
if (!dict.found("direction") && dict.found("trackForward"))
|
||||||
|
{
|
||||||
|
trackDirection_ =
|
||||||
|
dict.lookupType<bool>("trackForward")
|
||||||
|
? trackDirection::FORWARD
|
||||||
|
: trackDirection::BACKWARD;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
trackDirection_ = trackDirectionNames_[word(dict.lookup("direction"))];
|
||||||
|
}
|
||||||
|
|
||||||
dict.lookup("trackForward") >> trackForward_;
|
|
||||||
dict.lookup("lifeTime") >> lifeTime_;
|
dict.lookup("lifeTime") >> lifeTime_;
|
||||||
if (lifeTime_ < 1)
|
if (lifeTime_ < 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -112,6 +112,7 @@ SourceFiles
|
|||||||
#include "vectorList.H"
|
#include "vectorList.H"
|
||||||
#include "writer.H"
|
#include "writer.H"
|
||||||
#include "indirectPrimitivePatch.H"
|
#include "indirectPrimitivePatch.H"
|
||||||
|
#include "NamedEnum.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -133,6 +134,24 @@ class streamLine
|
|||||||
:
|
:
|
||||||
public fvMeshFunctionObject
|
public fvMeshFunctionObject
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public data types
|
||||||
|
|
||||||
|
//- Track direction enumerations
|
||||||
|
enum trackDirection
|
||||||
|
{
|
||||||
|
FORWARD,
|
||||||
|
BACKWARD,
|
||||||
|
BOTH
|
||||||
|
};
|
||||||
|
|
||||||
|
//- Track direction enumeration names
|
||||||
|
static const NamedEnum<trackDirection, 3> trackDirectionNames_;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Input dictionary
|
//- Input dictionary
|
||||||
@ -147,8 +166,8 @@ class streamLine
|
|||||||
//- Interpolation scheme to use
|
//- Interpolation scheme to use
|
||||||
word interpolationScheme_;
|
word interpolationScheme_;
|
||||||
|
|
||||||
//- Whether to use +u or -u
|
//- The direction in which to track
|
||||||
bool trackForward_;
|
trackDirection trackDirection_;
|
||||||
|
|
||||||
//- Maximum lifetime (= number of cells) of particle
|
//- Maximum lifetime (= number of cells) of particle
|
||||||
label lifeTime_;
|
label lifeTime_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
|
|
||||||
const label UIndex_;
|
const label UIndex_;
|
||||||
|
|
||||||
const bool trackForward_;
|
bool trackForward_;
|
||||||
|
|
||||||
const label nSubCycle_;
|
const label nSubCycle_;
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ namespace Foam
|
|||||||
class cyclicACMIGAMGInterfaceField
|
class cyclicACMIGAMGInterfaceField
|
||||||
:
|
:
|
||||||
public GAMGInterfaceField,
|
public GAMGInterfaceField,
|
||||||
virtual public cyclicACMILduInterfaceField
|
public cyclicACMILduInterfaceField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace Foam
|
|||||||
class cyclicAMIGAMGInterfaceField
|
class cyclicAMIGAMGInterfaceField
|
||||||
:
|
:
|
||||||
public GAMGInterfaceField,
|
public GAMGInterfaceField,
|
||||||
virtual public cyclicAMILduInterfaceField
|
public cyclicAMILduInterfaceField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
class cyclicACMIGAMGInterface
|
class cyclicACMIGAMGInterface
|
||||||
:
|
:
|
||||||
public GAMGInterface,
|
public GAMGInterface,
|
||||||
virtual public cyclicACMILduInterface
|
public cyclicACMILduInterface
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
class cyclicAMIGAMGInterface
|
class cyclicAMIGAMGInterface
|
||||||
:
|
:
|
||||||
public GAMGInterface,
|
public GAMGInterface,
|
||||||
virtual public cyclicAMILduInterface
|
public cyclicAMILduInterface
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ functions
|
|||||||
type streamLine;
|
type streamLine;
|
||||||
writeControl writeTime;
|
writeControl writeTime;
|
||||||
setFormat vtk;
|
setFormat vtk;
|
||||||
trackForward true;
|
direction forward;
|
||||||
fields (p U);
|
fields (p U);
|
||||||
lifeTime 10000;
|
lifeTime 10000;
|
||||||
nSubCycle 5;
|
nSubCycle 5;
|
||||||
|
|||||||
@ -16,8 +16,8 @@ streamLines
|
|||||||
|
|
||||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
||||||
|
|
||||||
// Tracked forwards (+U) or backwards (-U)
|
// Track forward (+U) or backward (-U) or both
|
||||||
trackForward true;
|
direction forward;
|
||||||
|
|
||||||
// Names of fields to sample. Should contain above velocity field!
|
// Names of fields to sample. Should contain above velocity field!
|
||||||
fields (p U);
|
fields (p U);
|
||||||
|
|||||||
@ -19,8 +19,8 @@ streamLines
|
|||||||
|
|
||||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
||||||
|
|
||||||
// Tracked forwards (+U) or backwards (-U)
|
// Track forward (+U) or backward (-U) or both
|
||||||
trackForward true;
|
direction forward;
|
||||||
|
|
||||||
// Names of fields to sample. Should contain above velocity field!
|
// Names of fields to sample. Should contain above velocity field!
|
||||||
fields (p U k);
|
fields (p U k);
|
||||||
|
|||||||
@ -60,8 +60,8 @@ functions
|
|||||||
|
|
||||||
setFormat vtk; //gnuplot;//xmgr;//raw;//jplot;//csv;//ensight;
|
setFormat vtk; //gnuplot;//xmgr;//raw;//jplot;//csv;//ensight;
|
||||||
|
|
||||||
// Tracked forwards (+U) or backwards (-U)
|
// Track forward (+U) or backward (-U) or both
|
||||||
trackForward true;
|
direction forward;
|
||||||
|
|
||||||
// Names of fields to sample. Should contain above velocity field!
|
// Names of fields to sample. Should contain above velocity field!
|
||||||
fields (p k U);
|
fields (p k U);
|
||||||
|
|||||||
@ -137,7 +137,7 @@ interfaceComposition
|
|||||||
(
|
(
|
||||||
(gas in liquid)
|
(gas in liquid)
|
||||||
{
|
{
|
||||||
type Saturated;
|
type saturated;
|
||||||
species ( H2O );
|
species ( H2O );
|
||||||
Le 1.0;
|
Le 1.0;
|
||||||
saturationPressure
|
saturationPressure
|
||||||
|
|||||||
@ -137,7 +137,7 @@ interfaceComposition
|
|||||||
(
|
(
|
||||||
(gas in liquid)
|
(gas in liquid)
|
||||||
{
|
{
|
||||||
type Saturated;
|
type saturated;
|
||||||
species ( H2O );
|
species ( H2O );
|
||||||
Le 1.0;
|
Le 1.0;
|
||||||
saturationPressure
|
saturationPressure
|
||||||
|
|||||||
@ -138,7 +138,7 @@ interfaceComposition
|
|||||||
(
|
(
|
||||||
(gas in liquid)
|
(gas in liquid)
|
||||||
{
|
{
|
||||||
type Saturated;
|
type saturated;
|
||||||
species ( water );
|
species ( water );
|
||||||
Le 1.0;
|
Le 1.0;
|
||||||
saturationPressure
|
saturationPressure
|
||||||
|
|||||||
Reference in New Issue
Block a user