which allows lambda to set higher in the cells adjacent to the boundary which is particularly useful when solving for waves in a domain with no mean-flow and wave BCs to avoid numerical stability problems where the specified wave flow reverses into the domain. The alternative is to use symmetry rather than wave BCs on the side patches which is stable without using lambdaBoundary but there is modest distortion of the wave profile adjacent to the side patches which does not propagate into the domain due to the wave forcing.
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
format ascii;
|
|
class dictionary;
|
|
location "constant";
|
|
object fvModels;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
forcing
|
|
{
|
|
type waveForcing;
|
|
|
|
libs ("libwaves.so");
|
|
|
|
liquidPhase water;
|
|
|
|
origins
|
|
(
|
|
(0 0.75 0.5)
|
|
(0 0.25 0.5)
|
|
(0.25 0 0.5)
|
|
(0.75 0 0.5)
|
|
);
|
|
|
|
directions
|
|
(
|
|
( 0 1 0)
|
|
( 0 -1 0)
|
|
(-1 0 0)
|
|
( 1 0 0)
|
|
);
|
|
|
|
scale
|
|
{
|
|
type halfCosineRamp;
|
|
start 0;
|
|
duration 0.5;
|
|
}
|
|
|
|
lambda 5;
|
|
lambdaBoundary 25;
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|