I am trying to simulate a water storage tank for a refrigeration system. I am new to OpenFOAM.
But, I tried to find related information on the internet, which turned out to be quite difficult as there is just sparse information about OpenFOAM and especially about my specific project.
The water tank will have one inlet and one outlet.
The written blockMesh file is:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 0.1;
vertices
(
(0 0 0) //0
(3.984 0 0) //1
(3.984 1.992 0) //2
(0 1.992 0) //3
(0 0 2.984) //4
(3.984 0 2.984) //5
(3.984 1.992 2.984) //6
(0 1.992 2.984) //7
(0.147 0.197 2.984) //8
(0.353 0.197 2.984) //9
(0.147 0.313 2.984) //10
(0.353 0.313 2.984) //11
(0.147 1.679 2.984) //12
(0.353 1.679 2.984) //13
(0.353 1.885 2.984) //14
(0.147 1.885 2.984) //15
);
blocks
(
hex (0 1 2 3 4 5 6 7) (4 2 3) simpleGrading (1 1 1)
hex (8 9 10 11) (1 1 0) simpleGrading (1 1 1)
hex (12 13 14 15) (1 1 0) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(8 9 10 11)
);
}
outlet
{
type patch;
faces
(
(12 13 14 15)
);
}
fixedWalls
{
type wall;
faces
(
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
(3 7 6 2)
(0 3 2 1)
(4 5 6 7)
);
}
);
//mergePatchPairs
(
);
Should the inlet and outlet be separate blocks or be combined with the rest of the tank in one hex-block?
There is no need to do all the work. I would appreciate just some helpful tips, to what I need to pay attention to. (I know that the order of the vertices is important, is this correct?)
This is the error-code I received, when I run the "blockMesh" Command in the terminal:
\*---------------------------------------------------------------------------*/
Build : 8-1c9b5879390b
Exec : blockMesh
Date : May 27 2021
Time : 11:03:25
Host : "DESKTOP-DCDG4KB"
PID : 600
I/O : uncollated
Case : /home/flaayor/OpenFOAM/flaayor-8/run/cavity
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Creating block mesh from
"system/blockMeshDict"
Creating block edges
No non-planar block faces defined
Creating topology blocks
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::Vector<double> Foam::face::centre<Foam::UIndirectList<Foam::Vector<double> > >(Foam::UIndirectList<Foam::Vector<double> > const&) at ??:?
#4 Foam::face::centre(Foam::Field<Foam::Vector<double> > const&) const at ??:?
#5 Foam::blockDescriptor::check(Foam::Istream const&) at ??:?
#6 Foam::blockDescriptor::blockDescriptor(Foam::dictionary const&, int, Foam::Field<Foam::Vector<double> > const&, Foam::PtrList<Foam::blockEdge> const&, Foam::PtrList<Foam::blockFace> const&, Foam::Istream&) at ??:?
#7 Foam::block::block(Foam::dictionary const&, int, Foam::Field<Foam::Vector<double> > const&, Foam::PtrList<Foam::blockEdge> const&, Foam::PtrList<Foam::blockFace> const&, Foam::Istream&) at ??:?
#8 Foam::block::New(Foam::dictionary const&, int, Foam::Field<Foam::Vector<double> > const&, Foam::PtrList<Foam::blockEdge> const&, Foam::PtrList<Foam::blockFace> const&, Foam::Istream&) at ??:?
#9 void Foam::PtrList<Foam::block>::read<Foam::block::iNew>(Foam::Istream&, Foam::block::iNew const&) at ??:?
#10 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ??:?
#11 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) at ??:?
#12 ? in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/blockMesh"
#13 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#14 ? in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/blockMesh"
Segmentation fault (core dumped)


For some reason you have defined hex-blocks with 4 points - you definitely need 8 points per hex. If you have, for example, two hex-blocks joined together you will need to define 12 points, 4 of which will be common between the two blocks.