mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add time ramping to surfaceNormalFixedValue (#1407)
- alternatively can use uniformNormalFixedValue with PatchFunction1 specification and temporal ramping. TUT: add ramped example for simpleCar
This commit is contained in:
committed by
Andrew Heather
parent
de487f0f0a
commit
8d7b8043a4
@ -18,12 +18,42 @@ dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (10 0 0);
|
||||
|
||||
// Surface normal with time ramping
|
||||
intakeType1
|
||||
{
|
||||
type surfaceNormalFixedValue;
|
||||
refValue uniform 1.2;
|
||||
ramp table ((0 0) (10 1));
|
||||
}
|
||||
|
||||
// Uniform surface normal with Function1 for ramping
|
||||
intakeType2
|
||||
{
|
||||
type uniformNormalFixedValue;
|
||||
uniformValue table ((0 0) (10 1.2));
|
||||
}
|
||||
|
||||
// Uniform surface normal with time ramping
|
||||
intakeType3
|
||||
{
|
||||
// Or directly with uniform value (ramping also possible)
|
||||
type uniformNormalFixedValue;
|
||||
uniformValue constant 1.2;
|
||||
ramp table ((0 0) (10 1));
|
||||
}
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (10 0 0);
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
airIntake
|
||||
{
|
||||
$intakeType1;
|
||||
}
|
||||
|
||||
outlet
|
||||
@ -44,4 +74,8 @@ boundaryField
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#remove "intakeType.*"
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,40 +24,27 @@ boundaryField
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.125;
|
||||
value $internalField;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
upperWall
|
||||
|
||||
"(body|upperWall|lowerWall)"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.125;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.125;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
}
|
||||
body
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.125;
|
||||
value $internalField;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -24,31 +24,21 @@ boundaryField
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.375;
|
||||
value $internalField;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
upperWall
|
||||
"(body|upperWall|lowerWall)"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.375;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.375;
|
||||
}
|
||||
body
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.375;
|
||||
value $internalField;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -21,44 +21,25 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
upperWall
|
||||
"(body|upperWall|lowerWall)"
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
body
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -20,26 +20,22 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"(body|upperWall|lowerWall)"
|
||||
{
|
||||
type zeroGradient;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -4,6 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication createPatch -overwrite
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object createPatchDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
pointSync false;
|
||||
|
||||
// Patches to create
|
||||
patches
|
||||
(
|
||||
{
|
||||
// Name of new patch
|
||||
name airIntake;
|
||||
|
||||
// Dictionary to construct new patch from
|
||||
patchInfo
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
|
||||
// How to construct: either from 'patches' or 'set'
|
||||
constructFrom set;
|
||||
|
||||
// If constructFrom = patches : names of patches. Wildcards allowed.
|
||||
patches ();
|
||||
|
||||
// If constructFrom = set : name of faceSet
|
||||
set airIntake;
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -31,6 +31,23 @@ actions
|
||||
source setToCellZone;
|
||||
set porousCells;
|
||||
}
|
||||
|
||||
{
|
||||
name airIntake;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
patch body;
|
||||
}
|
||||
{
|
||||
name airIntake;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source boxToFace;
|
||||
box (2.6 0.75 0)(2.64 0.8 0.1);
|
||||
}
|
||||
|
||||
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user