zeroDimensionalFvMesh: New utility to create zero dimensional mesh
This utility can be run with no arguments or configuration, and will create a unit cube mesh with empty patches on all sides.
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
zeroDimensionalMesh.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/zeroDimensionalMesh
|
||||
@ -0,0 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
zeroDimensionalMesh
|
||||
|
||||
Description
|
||||
Creates a zero-dimensional mesh
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "zeroDimensionalFvMesh.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
fvMesh mesh(zeroDimensionalFvMesh(runTime));
|
||||
|
||||
mesh.setInstance(runTime.constant());
|
||||
|
||||
mesh.write();
|
||||
|
||||
Info<< "End" << nl << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -9,7 +9,7 @@ cd ${0%/*} || exit 1
|
||||
gYs="air.gas H2O.gas C3H8O.gas"
|
||||
lYs="H2O.liquid C3H8O.liquid"
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
|
||||
setInertY()
|
||||
{
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-1 -1 -1)
|
||||
(1 -1 -1)
|
||||
(1 1 -1)
|
||||
(-1 1 -1)
|
||||
|
||||
(-1 -1 1)
|
||||
(1 -1 1)
|
||||
(1 1 1)
|
||||
(-1 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
defaultPatch
|
||||
{
|
||||
name defaultPatch;
|
||||
type empty;
|
||||
}
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -47,7 +47,7 @@ setThermoAndEnergy()
|
||||
constant/physicalProperties.$phase
|
||||
}
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
|
||||
for gY in $gYs
|
||||
do
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-1 -1 -1)
|
||||
(1 -1 -1)
|
||||
(1 1 -1)
|
||||
(-1 1 -1)
|
||||
|
||||
(-1 -1 1)
|
||||
(1 -1 1)
|
||||
(1 1 1)
|
||||
(-1 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
defaultPatch
|
||||
{
|
||||
name defaultPatch;
|
||||
type empty;
|
||||
}
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@ cd "${0%/*}" || exit 1
|
||||
# Source run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- 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 "system";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@ cd "${0%/*}" || exit 1
|
||||
# Source run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- 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 "system";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@ cd "${0%/*}" || exit 1
|
||||
# Source run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- 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 "system";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@ cd "${0%/*}" || exit 1
|
||||
# Source run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- 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 "system";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@ cd "${0%/*}" || exit 1
|
||||
# Source run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- 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 "system";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@ cd "${0%/*}" || exit 1
|
||||
# Source run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- 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 "system";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,7 +25,7 @@ setThermoAndEnergy()
|
||||
constant/physicalProperties.$phase
|
||||
}
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication zeroDimensionalMesh
|
||||
|
||||
for gHe in $gHes
|
||||
do
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-1 -1 -1)
|
||||
(1 -1 -1)
|
||||
(1 1 -1)
|
||||
(-1 1 -1)
|
||||
|
||||
(-1 -1 1)
|
||||
(1 -1 1)
|
||||
(1 1 1)
|
||||
(-1 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
defaultPatch
|
||||
{
|
||||
name defaultPatch;
|
||||
type empty;
|
||||
}
|
||||
|
||||
boundary
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user