mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support surfaceFieldValue on multiple faceZones or patches (#1874)
- additional "names" entry to specify a word/regex list of selections
For example,
{
type patch;
name inlets;
names ("inlet_[0-9].*" inlet);
}
- if "names" exists AND contains a literal (non-regex) that can be used
as a suitable value for "name", the "name" entry becomes optional.
For example,
{
type patch;
names ("inlet_[0-9].*" inlet);
// inferred name = inlet
}
- reduce some overhead in surfaceFieldValue
TUT: surfaceFieldValue on patches : reactingParcelFoam/verticalChannel
This commit is contained in:
@ -3,15 +3,12 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# create mesh
|
||||
runApplication blockMesh
|
||||
|
||||
restore0Dir
|
||||
|
||||
# initialise with potentialFoam solution
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication potentialFoam
|
||||
|
||||
# run the solver
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
16
tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun-parallel
Executable file
16
tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun-parallel
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication potentialFoam
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -53,7 +53,27 @@ maxDeltaT 1e-03;
|
||||
|
||||
functions
|
||||
{
|
||||
surfaceFieldValue1
|
||||
avgInlets
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
libs (fieldFunctionObjects);
|
||||
enabled yes;
|
||||
writeControl writeTime;
|
||||
log yes;
|
||||
writeFields off;
|
||||
surfaceFormat vtk;
|
||||
regionType patch;
|
||||
// name inlet;
|
||||
names (inlet "inlet.*");
|
||||
operation weightedAverage;
|
||||
weightField phi;
|
||||
fields
|
||||
(
|
||||
T
|
||||
);
|
||||
}
|
||||
|
||||
avgOutlets
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
libs (fieldFunctionObjects);
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2006 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
|
||||
coeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots ( );
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -48,7 +48,7 @@ runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
{
|
||||
surfaceFieldValue1
|
||||
avgOutlets
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
libs (fieldFunctionObjects);
|
||||
|
||||
Reference in New Issue
Block a user