ENH: New vibro-acoustic model suite

- New solver: `acousticFoam`
  - New base finite-area region class: `regionFaModel`
  - New base shell model classes:
    - `vibrationShellModel`
    - `thermalShellModel`
  - New shell models:
    - A vibration-shell model: `KirchhoffShell`
    - A thermal-shell model: `thermalShell`
  - New finite-area/finite-volume boundary conditions:
    - `clampedPlate`
    - `timeVaryingFixedValue`
    - `acousticWaveTransmissive`
  - New base classes for `fvOption` of finite-area methods: `faOption`
  - New `faOption`s:
    - `contactHeatFluxSource`
    - `externalFileSource`
    - `externalHeatFluxSource`
    - `jouleHeatingSource`
  - New tutorial: `compressible/acousticFoam/obliqueAirJet`

Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
This commit is contained in:
sergio
2019-01-29 11:06:35 -08:00
committed by Andrew Heather
parent 25246f22a6
commit bc430ccdef
131 changed files with 10959 additions and 191 deletions

View File

@ -343,8 +343,8 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchPointNormals() const
const labelListList& pntEdges = pointEdges();
tmp<vectorField> tpN(new vectorField(pntEdges.size(), Zero));
vectorField& pN = tpN.ref();
auto tpN = tmp<vectorField>::New(pntEdges.size(), Zero);
auto& pN = tpN.ref();
const vectorField faceNormals(ngbPolyPatchFaceNormals());
@ -406,8 +406,8 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::edgeNormals() const
Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const
{
tmp<vectorField> tfc(new vectorField(size()));
vectorField& fc = tfc.ref();
auto tfc = tmp<vectorField>::New(size());
auto& fc = tfc.ref();
// get reference to global face centres
const vectorField& gfc =
@ -427,13 +427,22 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const
Foam::tmp<Foam::vectorField> Foam::faPatch::delta() const
{
return edgeNormals()*(edgeNormals() & (edgeCentres() - edgeFaceCentres()));
//return edgeCentres() - edgeFaceCentres();
}
void Foam::faPatch::makeDeltaCoeffs(scalarField& dc) const
{
dc = 1.0/(edgeNormals() & delta());
dc = scalar(1)/(edgeNormals() & delta());
}
void Foam::faPatch::makeCorrectionVectors(vectorField& k) const
{
vectorField unitDelta(delta()/mag(delta()));
vectorField edgeNormMag(edgeNormals()/mag(edgeNormals()));
scalarField dn(edgeNormals() & delta());
k = edgeNormMag - (scalar(1)/(unitDelta & edgeNormMag))*unitDelta;
}
@ -445,7 +454,7 @@ const Foam::scalarField& Foam::faPatch::deltaCoeffs() const
void Foam::faPatch::makeWeights(scalarField& w) const
{
w = 1.0;
w = scalar(1);
}

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2017 Wikki Ltd
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -35,7 +36,9 @@ Author
SourceFiles
faPatch.C
newFaPatch.C
faPatchNew.C
faPatchTemplates.C
faPatchFaMeshTemplates.C
\*---------------------------------------------------------------------------*/
@ -68,9 +71,7 @@ class faPatch
public labelList,
public patchIdentifier
{
private:
// Private data
// Private Data
//- Neighbour polyPatch index
const label ngbPolyPatchIndex_;
@ -106,6 +107,8 @@ private:
protected:
// Protected Member Functions
//- The faPatch geometry initialisation is called by faBoundaryMesh
friend class faBoundaryMesh;
@ -143,7 +146,6 @@ public:
typedef faBoundaryMesh BoundaryMesh;
//- Runtime type information
TypeName("patch");
@ -189,7 +191,7 @@ public:
faPatch(const faPatch&, const faBoundaryMesh&);
//- Construct and return a clone, resetting the edge list
// and boundary mesh
//- and boundary mesh
virtual autoPtr<faPatch> clone
(
const faBoundaryMesh& bm,
@ -207,7 +209,7 @@ public:
// Selectors
//- Return a pointer to a new patch created
// on freestore from dictionary
//- on freestore from dictionary
static autoPtr<faPatch> New
(
const word& name,
@ -320,6 +322,8 @@ public:
//- Make patch edge - neighbour face distances
virtual void makeDeltaCoeffs(scalarField&) const;
void makeCorrectionVectors(vectorField&) const;
//- Return patch edge - neighbour face distances
const scalarField& deltaCoeffs() const;
@ -330,7 +334,7 @@ public:
void resetEdges(const labelList&);
// Evaluation functions
// Evaluation
//- Return given internal field next to patch as patch field
template<class Type>
@ -344,7 +348,7 @@ public:
) const;
//- Lookup and return the patchField of the named field from the
// local objectRegistry.
//- local objectRegistry.
// N.B. The dummy pointer arguments are used if this function is
// instantiated within a templated function to avoid a bug in gcc.
// See inletOutletFvPatchField.C and outletInletFvPatchField.C