Skip to content
Snippets Groups Projects
Commit 7b3eb9da authored by Mark Olesen's avatar Mark Olesen
Browse files

needed to drop backwardsCompatibility/derivedFvPatchFields again

- as Henry pointed out, they all go into one single table.
  So they'll clash with the correct incompressible versions.
parent 375e968b
Branches
Tags
No related merge requests found
Showing
with 1 addition and 642 deletions
......@@ -38,7 +38,5 @@ derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLe
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C
backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C
backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.C
LIB = $(FOAM_LIBBIN)/libcompressibleRASModels
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "surfaceFields.H"
#include "volFields.H"
#include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchField<scalar>(p, iF),
mixingLength_(0.001)
{}
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_)
{}
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
fixedValueFvPatchField<scalar>(p, iF, dict),
mixingLength_(readScalar(dict.lookup("mixingLength")))
{}
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf
)
:
fixedValueFvPatchField<scalar>(ptf),
mixingLength_(ptf.mixingLength_)
{}
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchField<scalar>(ptf, iF),
mixingLength_(ptf.mixingLength_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
// Lookup Cmu corresponding to the turbulence model selected
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cmu = readScalar(rasModel.coeffDict().lookup("Cmu"));
const scalar Cmu75 = pow(Cmu, 0.75);
const fvPatchField<scalar>& kp =
patch().lookupPatchField<volScalarField, scalar>("k");
operator==(Cmu75*kp*sqrt(kp)/mixingLength_);
fixedValueFvPatchField<scalar>::updateCoeffs();
}
void backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::write
(
Ostream& os
) const
{
// write with prefix for forwards compatibility
// mimic - fvPatchField<scalar>::write(os);
os.writeKeyword("type")
<< "compressible::" << type() << token::END_STATEMENT << nl;
os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl;
writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchScalarField,
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace compressible
} // End namespace Foam
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::compressible::
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
Description
Compatibility for the new namespace qualifier
Foam::compressible::turbulentMixingLengthDissipationRateInletFvPatchScalarField
SourceFiles
backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C
\*---------------------------------------------------------------------------*/
#ifndef backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet_H
#define backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet_H
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
/*---------------------------------------------------------------------------*\
Class backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
:
public fixedValueFvPatchScalarField
{
// Private data
//- turbulent length scale
scalar mixingLength_;
public:
//- Runtime type information
TypeName("turbulentMixingLengthDissipationRateInlet");
// Constructors
//- Construct from patch and internal field
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given
// backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
// onto a new patch
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
*this
)
);
}
//- Construct as copy setting internal field reference
backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField
(
*this,
iF
)
);
}
// Member functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace compressible
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "surfaceFields.H"
#include "volFields.H"
#include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchField<scalar>(p, iF),
mixingLength_(0.0),
kName_("k")
{}
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_),
kName_(ptf.kName_)
{}
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
fixedValueFvPatchField<scalar>(p, iF, dict),
mixingLength_(readScalar(dict.lookup("mixingLength"))),
kName_(dict.lookupOrDefault<word>("k", "k"))
{}
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField& ptf
)
:
fixedValueFvPatchField<scalar>(ptf),
mixingLength_(ptf.mixingLength_),
kName_(ptf.kName_)
{}
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField& ptf,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchField<scalar>(ptf, iF),
mixingLength_(ptf.mixingLength_),
kName_(ptf.kName_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
// Lookup Cmu corresponding to the turbulence model selected
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cmu = readScalar(rasModel.coeffDict().lookup("Cmu"));
const scalar Cmu25 = pow(Cmu, 0.25);
const fvPatchField<scalar>& kp =
patch().lookupPatchField<volScalarField, scalar>(kName_);
operator==(sqrt(kp)/(Cmu25*mixingLength_));
fixedValueFvPatchField<scalar>::updateCoeffs();
}
void backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::write
(
Ostream& os
) const
{
// write with prefix for forwards compatibility
// mimic - fvPatchField<scalar>::write(os);
os.writeKeyword("type")
<< "compressible::" << type() << token::END_STATEMENT << nl;
os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl;
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchScalarField,
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace compressible
} // End namespace Foam
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::compressible::
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
Description
Compatibility for the new namespace qualifier
Foam::compressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
SourceFiles
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef compressiblebackwardsCompatibilityTurbulentMixingLengthFrequencyInlet_H
#define compressiblebackwardsCompatibilityTurbulentMixingLengthFrequencyInlet_H
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
/*---------------------------------------------------------------------------*\
Class backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
:
public fixedValueFvPatchScalarField
{
// Private data
//- Turbulent length scale
scalar mixingLength_;
//- Name of the turbulent kinetic energy field
word kName_;
public:
//- Runtime type information
TypeName("turbulentMixingLengthFrequencyInlet");
// Constructors
//- Construct from patch and internal field
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given
// backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
// onto a new patch
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
*this
)
);
}
//- Construct as copy setting internal field reference
backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField
(
*this,
iF
)
);
}
// Member functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace compressible
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -42,6 +42,6 @@ derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFv
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C
backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C
LIB = $(FOAM_LIBBIN)/libincompressibleRASModels
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment