mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
3
applications/solvers/acoustic/acousticFoam/Make/files
Normal file
3
applications/solvers/acoustic/acousticFoam/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
acousticFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/acousticFoam
|
||||
14
applications/solvers/acoustic/acousticFoam/Make/options
Normal file
14
applications/solvers/acoustic/acousticFoam/Make/options
Normal file
@ -0,0 +1,14 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOption/lnInclude \
|
||||
-I$(LIB_SRC)/regionFaModels/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lregionFaModels
|
||||
99
applications/solvers/acoustic/acousticFoam/acousticFoam.C
Normal file
99
applications/solvers/acoustic/acousticFoam/acousticFoam.C
Normal file
@ -0,0 +1,99 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
acousticFoam
|
||||
|
||||
Group
|
||||
grpAcousticSolvers
|
||||
|
||||
Description
|
||||
Acoustic solver solving the acoustic pressure wave equation.
|
||||
|
||||
\f[
|
||||
\ddt2{pa} - c^2 \laplacian{pa} = 0
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
c | Sound speed
|
||||
pa | Acoustic pressure
|
||||
\endvartable
|
||||
|
||||
SourceFiles
|
||||
acousticFoam.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fvOptions.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Acoustic solver solving the acoustic pressure wave equation."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createRegionControls.H"
|
||||
|
||||
#include "readTransportProperties.H"
|
||||
#include "createFields.H"
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "paEqn.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
15
applications/solvers/acoustic/acousticFoam/createFields.H
Normal file
15
applications/solvers/acoustic/acousticFoam/createFields.H
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
Info << "\nReading pa" << endl;
|
||||
|
||||
volScalarField pa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
@ -0,0 +1,8 @@
|
||||
fvSolution solutionDict(runTime);
|
||||
|
||||
const dictionary& pimpleDict = solutionDict.subDict("PIMPLE");
|
||||
|
||||
bool solvePrimaryRegion
|
||||
(
|
||||
pimpleDict.getOrDefault("solvePrimaryRegion", true)
|
||||
);
|
||||
15
applications/solvers/acoustic/acousticFoam/paEqn.H
Normal file
15
applications/solvers/acoustic/acousticFoam/paEqn.H
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
fvScalarMatrix paEqn
|
||||
(
|
||||
fvm::d2dt2(pa) - sqr(c0)*fvc::laplacian(pa)
|
||||
);
|
||||
|
||||
if (solvePrimaryRegion)
|
||||
{
|
||||
paEqn.relax();
|
||||
paEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
pa.correctBoundaryConditions();
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
Info<< "\nReading transportProperties" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar c0("c0", dimVelocity, transportProperties);
|
||||
|
||||
dimensionedScalar rho("rho", dimDensity, transportProperties);
|
||||
|
||||
scalar MaxCo =
|
||||
max(mesh.surfaceInterpolation::deltaCoeffs()*c0).value()
|
||||
*runTime.deltaT().value();
|
||||
|
||||
Info<< "Max acoustic Courant Number = " << MaxCo << endl;
|
||||
@ -14,7 +14,9 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionFaModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
@ -28,4 +30,8 @@ EXE_LIBS = \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lradiationModels \
|
||||
-lregionModels
|
||||
-lfvOptions \
|
||||
-lfaOptions \
|
||||
-lregionModels \
|
||||
-lsampling \
|
||||
-lregionFaModels
|
||||
|
||||
Reference in New Issue
Block a user