CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Flow simulation in porous media (https://www.cfd-online.com/Forums/openfoam-solving/59009-flow-simulation-porous-media.html)

olesen December 11, 2007 04:33

I can't really see why you wan
 
I can't really see why you want/need to have a sub-dictionary 'por' with an entry 'por'.

Also, with the current porosity model, I don't think it's a particularly idea modifying the divergence term. Why can't you use the superficial velocity?

arkasshka December 11, 2007 05:09

Hi Mark Thank you very much f
 
Hi Mark
Thank you very much for the answer. I am rather new in OpenFOAM, so my answers could seem a little bit silly.
About "por". I assume to use a por as parameter which describes the porosity and to multiply the divergence term in transport equation.
About the superficial velocity. Basically, I would like to develop a code which simulates combustion in a porous media. To do it I should have a real velocity rather than superficial. Brief explanation why. Here is as flow geometry:

| Free flow 1 |Porosity 0.05 | Free flow 2 |

In this case there is a region of high flow speed in the porous domain which prevents the propagation of the combustion wave to the domain Free flow 1. I have doubts that the assumption of superficial velocity will work in this case. What do you think about it?

olesen December 11, 2007 05:40

I would be hesitant to touch t
 
I would be hesitant to touch the divergence terms at all, but especially with such a non-porous region (really only 5% open area?).
This formulation would give huge gradients at the interfaces.

Would it be possible to calculate and use the superficial velocity everywhere and just recalculate the true velocity when you need it (eg, for the flame propogation)?

I've attached an updated version of the porousMedia http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif porousMedia.tar.gz that already has the porosity entry that you wanted and which also wraps the fvm::ddt() method.

It should not be too hard to add something similar that returns the real (not superficial) velocity etc. You just need to find a reasonable name for the method first ;)

arkasshka December 11, 2007 06:37

Hi Mark Thank you very much f
 
Hi Mark
Thank you very much for the porousMedia!!! But I have a small problem to use it. The compilation of the src/ folder is OK. But when I compile my solver I have error output

wmake
Making dependency list for source file rhoExplicitPorousSimpleFoam.C
could not open file coordinateSystem.H for source file rhoExplicitPorousSimpleFoam.C
could not open file coordinateSystems.H for source file rhoExplicitPorousSimpleFoam.C
could not open file porousZonesTemplates.C for source file rhoExplicitPorousSimpleFoam.C
SOURCE=rhoExplicitPorousSimpleFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/cfdTools -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/bas ic/lnInclude -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -IlnInclude -I. -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoExplicitPorousSimpleFoam.o
In file included from /home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZones.H:40,
from rhoExplicitPorousSimpleFoam.C:38:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:58:30: error: coordinateSystem.H: No such file or directory
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:59:31: error: coordinateSystems.H: No such file or directory
In file included from rhoExplicitPorousSimpleFoam.C:38:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZones.H:154:37: error: porousZonesTemplates.C: No such file or directory
rhoExplicitPorousSimpleFoam.C:39:30: error: coordinateSystem.H: No such file or directory
In file included from /home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZones.H:40,
from rhoExplicitPorousSimpleFoam.C:38:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:98: error: ‚coordinateSystem‚ does not name a type
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:198: error: expected class-name before ‚{‚ token
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:210: error: expected ‚,‚ or ‚...‚ before ‚&‚ token
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:210: error: ISO C++ forbids declaration of ‚coordinateSystems‚ with no type
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:250: error: ISO C++ forbids declaration of ‚coordinateSystem‚ with no type
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:250: error: expected ‚;‚ before ‚&‚ token
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:256: error: expected `;' before ‚const‚
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H: In constructor ‚Foam::porousZone::iNew::iNew(const Foam::fvMesh&)‚:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:206: error: class ‚Foam::porousZone::iNew‚ does not have any field named ‚coordinateSystems‚
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H: In constructor ‚Foam::porousZone::iNew::iNew(const Foam::fvMesh&, int)‚:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:212: error: class ‚Foam::porousZone::iNew‚ does not have any field named ‚coordinateSystems‚
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:212: error: ‚cs‚ was not declared in this scope
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H: In member function ‚Foam::autoPtr<foam::porouszone> Foam::porousZone::iNew::operator()(Foam::Istream&) const‚:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:220: error: ‚rewriteDict‚ was not declared in this scope
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H: In member function ‚const Foam::point& Foam::porousZone::origin() const‚:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:258: error: ‚coordSys_‚ was not declared in this scope
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H: In member function ‚const Foam::vector& Foam::porousZone::axis() const‚:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZone.H:264: error: ‚coordSys_‚ was not declared in this scope
In file included from rhoExplicitPorousSimpleFoam.C:38:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZones.H: At global scope:
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZones.H:67: error: ‚coordinateSystems‚ does not name a type
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZones.H:87: error: expected ‚,‚ or ‚...‚ before ‚&‚ token
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/por ousZones.H:87: error: ISO C++ forbids declaration of ‚coordinateSystems‚ with no type
make: *** [Make/linux64GccDPOpt/rhoExplicitPorousSimpleFoam.o] Error 1

Probably I should add something in the *.dep file? ;)

olesen December 11, 2007 07:15

Did you add -I$(LIB_SRC)/meshT
 
Did you add -I$(LIB_SRC)/meshTools/lnInclude and -lmeshTools in the Make/options?

BTW: DO NOT edit the *.dep files, but you can use wclean to remove them before rebuilding

olesen December 11, 2007 09:16

Since you copied them in place
 
Since you copied them in place, you probably tricked the build mechanism a bit.

Either delete all the files in the lnInclude directory before re-issuing wmake, or just add the missing links by hand (quicker).

arkasshka December 11, 2007 09:41

What lnInclude directory do yo
 
What lnInclude directory do you mean? In which I shouldspecify the missing links?http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
I have modified a little bit the options file like this
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/cfdTools/general/porousMedia \
-I$(LIB_SRC)/meshTools/coordinateSystems

EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lbasicThermophysicalModels \
-lspecie \
-lcompressibleTurbulenceModels

but I still have problem with compiling:
iwsta019@woody1:rhoExplicitPorousSimpleFoam>wmake
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/cfdTools -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/bas ic/lnInclude -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/cfdTools/ge neral/porousMedia -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/coordinateSyst ems -IlnInclude -I. -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/rhoExplicitPorousSimpleFoam.o -L/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt \
-lfiniteVolume -lmeshTools -lbasicThermophysicalModels -lspecie -lcompressibleTurbulenceModels -lOpenFOAM -liberty -ldl -lm -o /home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPO pt/rhoExplicitPorousSimpleFoam
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libfiniteV olume.so: undefined reference to `Foam::coordinateSystems::coordinateSystems(Foam:: objectRegistry const&, Foam::word const&, Foam::fileName const&)'
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libfiniteV olume.so: undefined reference to `Foam::coordinateSystems::rewriteDict(Foam::dictio nary&, bool) const'
/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libfiniteV olume.so: undefined reference to `Foam::coordinateSystems::coordinateSystems()'
collect2: ld returned 1 exit status
make: *** [/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDP Opt/rhoExplicitPorousSimpleFoam] Error 1

olesen December 11, 2007 10:05

I meant that $(LIB_SRC)/finite
 
I meant that $(LIB_SRC)/finiteVolume/lnInclude probably didn't get updated quite correctly - check that all the porousMedia/*.[CH] files are linked there.

The next compile/link problem is that the new coordinateSystems class got missed in Make/files. Simple add coodinateSystems.C to the meshTools/Make/files and wmake libso meshTools

BTW: The coordinateSystems::rewriteDict() method *is* a bit of a hack, but it allows you to reference a coordinateSystem from a collection saved under constant/coordinateSystems.

arkasshka December 11, 2007 10:55

Hi Mark Thank you very much f
 
Hi Mark
Thank you very much for your advise. I have done the second and the code had been compiled. Still, you know any new piece of knowledge generates new questions. Probably, I should have mentioned, that I consider steady state problem. At the end of calculation, just after the last iteration my code gives the following:
Time = 1000

smoothSolver: Solving for Ux, Initial residual = 1.65107e-09, Final residual = 1.65107e-09, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 8.76164e-09, Final residual = 8.76164e-09, No Iterations 0
smoothSolver: Solving for Uz, Initial residual = 4.52693e-09, Final residual = 4.52693e-09, No Iterations 0
DILUPBiCG: Solving for h, Initial residual = 9.81735e-07, Final residual = 9.81735e-07, No Iterations 0
GAMG: Solving for p, Initial residual = 6.82324e-09, Final residual = 6.82324e-09, No Iterations 0
time step continuity errors : sum local = 1.69312e-06, global = -3.26942e-08, cumulative = -0.00246733
rho max/min : 1.15908 1.15875
ExecutionTime = 181.15 s ClockTime = 182 s

End

#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFO AM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFO AM.so"
#2 ?? in "/lib64/tls/libc.so.6"
#3 ?? in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#4 ?? in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#5 std::string::_Rep::_M_dispose(std::allocator<char> const&) in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#6 std::basic_string<char,>, std::allocator<char> >::~basic_string() in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#7 Foam::PtrList<foam::porouszone>::~PtrList() in "/home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/applications/bin/linux64GccDP Opt/rhoExplicitPorousSimpleFoam"
#8 main in "/home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/applications/bin/linux64GccDP Opt/rhoExplicitPorousSimpleFoam"
#9 __libc_start_main in "/lib64/tls/libc.so.6"
#10 Foam::lduMatrix::lduMatrix(Foam::lduMatrix&, bool) at ../sysdeps/x86_64/elf/start.S:116
Segmentation fault

Next question. As I understood, the porosity is being multiplied by every term to consider the superficial velocity instread of real one, right?

And the third question. After recompiling the meshTools I have got the error output. Here is the beginning:
iwsta019@woody1:src>wmake meshTools
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/triSurface/lnInclude -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/lagrangian/basic/lnInclu de -IlnInclude -I. -I/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/cellClassification.o Make/linux64GccDPOpt/cellInfo.o Make/linux64GccDPOpt/cellQuality.o Make/linux64GccDPOpt/cellDistFuncs.o Make/linux64GccDPOpt/patchWave.o Make/linux64GccDPOpt/wallPoint.o Make/linux64GccDPOpt/cellFeatures.o Make/linux64GccDPOpt/parabolicCylindricalCS.o Make/linux64GccDPOpt/coordinateSystem.o Make/linux64GccDPOpt/toroidalCS.o Make/linux64GccDPOpt/cartesianCS.o Make/linux64GccDPOpt/newCoordinateSystem.o Make/linux64GccDPOpt/coordinateSystems.o Make/linux64GccDPOpt/cylindricalCS.o Make/linux64GccDPOpt/sphericalCS.o Make/linux64GccDPOpt/coordinateRotation.o Make/linux64GccDPOpt/EulerCoordinateRotation.o Make/linux64GccDPOpt/STARCDCoordinateRotation.o Make/linux64GccDPOpt/polyMeshZipUpCells.o Make/linux64GccDPOpt/primitiveMeshGeometry.o Make/linux64GccDPOpt/meshSearch.o Make/linux64GccDPOpt/meshTools.o Make/linux64GccDPOpt/PointEdgeWaveName.o Make/linux64GccDPOpt/pointEdgePoint.o Make/linux64GccDPOpt/regionSplit.o Make/linux64GccDPOpt/octreeName.o Make/linux64GccDPOpt/octreeDataPoint.o Make/linux64GccDPOpt/octreeDataPointTreeLeaf.o Make/linux64GccDPOpt/octreeDataEdges.o Make/linux64GccDPOpt/octreeDataCell.o Make/linux64GccDPOpt/octreeDataFace.o Make/linux64GccDPOpt/treeBoundBox.o Make/linux64GccDPOpt/treeNodeName.o Make/linux64GccDPOpt/treeLeafName.o Make/linux64GccDPOpt/pointIndexHitIOList.o Make/linux64GccDPOpt/indexedOctreeName.o Make/linux64GccDPOpt/treeDataTriSurface.o Make/linux64GccDPOpt/cellSet.o Make/linux64GccDPOpt/topoSet.o Make/linux64GccDPOpt/faceSet.o Make/linux64GccDPOpt/pointSet.o Make/linux64GccDPOpt/topoSetSource.o Make/linux64GccDPOpt/faceToCell.o Make/linux64GccDPOpt/fieldToCell.o Make/linux64GccDPOpt/pointToCell.o Make/linux64GccDPOpt/shapeToCell.o Make/linux64GccDPOpt/boxToCell.o Make/linux64GccDPOpt/rotatedBoxToCell.o Make/linux64GccDPOpt/labelToCell.o Make/linux64GccDPOpt/surfaceToCell.o Make/linux64GccDPOpt/cellToCell.o Make/linux64GccDPOpt/nearestToCell.o Make/linux64GccDPOpt/nbrToCell.o Make/linux64GccDPOpt/zoneToCell.o Make/linux64GccDPOpt/faceToFace.o Make/linux64GccDPOpt/labelToFace.o Make/linux64GccDPOpt/cellToFace.o Make/linux64GccDPOpt/normalToFace.o Make/linux64GccDPOpt/pointToFace.o Make/linux64GccDPOpt/patchToFace.o Make/linux64GccDPOpt/boundaryToFace.o Make/linux64GccDPOpt/zoneToFace.o Make/linux64GccDPOpt/boxToFace.o Make/linux64GccDPOpt/labelToPoint.o Make/linux64GccDPOpt/pointToPoint.o Make/linux64GccDPOpt/cellToPoint.o Make/linux64GccDPOpt/faceToPoint.o Make/linux64GccDPOpt/boxToPoint.o Make/linux64GccDPOpt/surfaceToPoint.o Make/linux64GccDPOpt/zoneToPoint.o Make/linux64GccDPOpt/surfaceSets.o Make/linux64GccDPOpt/orientedSurface.o Make/linux64GccDPOpt/surfaceIntersection.o Make/linux64GccDPOpt/surfaceIntersectionFuncs.o Make/linux64GccDPOpt/edgeIntersections.o Make/linux64GccDPOpt/booleanSurface.o Make/linux64GccDPOpt/intersectedSurface.o Make/linux64GccDPOpt/edgeSurface.o Make/linux64GccDPOpt/triSurfaceSearch.o Make/linux64GccDPOpt/octreeDataTriSurface.o Make/linux64GccDPOpt/octreeDataTriSurfaceTreeLeaf.o Make/linux64GccDPOpt/triangleFuncs.o Make/linux64GccDPOpt/surfaceFeatures.o Make/linux64GccDPOpt/triSurfaceMeshes.o Make/linux64GccDPOpt/twoDPointCorrector.o Make/linux64GccDPOpt/directMappedPolyPatch.o Make/linux64GccDPOpt/directMappedPointPatch.o -L/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt \
-lOpenFOAM -liberty -ldl -lm -o OpenFOAM.out
/usr/lib/../lib64/crt1.o(.text+0x21): In function `_start':
../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
Make/linux64GccDPOpt/meshSearch.o(.gnu.linkonce.t._ZNK4Foam8particleINS _15passiv eParticleEE4typeEv+0x3): In function `Foam::particle<foam::passiveparticle>::type() const':
: undefined reference to `Foam::particle<foam::passiveparticle>::typeName'
Make/linux64GccDPOpt/treeDataTriSurface.o(.text+0xa0d): In function `Foam::treeDataTriSurface::getVolumeType(Foam::ind exedOctree<foam::treedatatrisu rface> const&, Foam::Vector<double> const&) const':

and here is the end:
: undefined reference to `Foam::triSurface::operator=(Foam::triSurface const&)'
Make/linux64GccDPOpt/octreeDataTriSurface.o(.text+0x1b2e): In function `Foam::octreeDataTriSurface::getSampleType(Foam::o ctree<foam::octreedatatrisurfa ce> const&, Foam::Vector<double> const&) const':
: undefined reference to `Foam::triSurfaceTools::surfaceNormal(Foam::triSur face const&, int, Foam::Vector<double> const&)'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.text+0x1c08): In function `Foam::triSurfaceMeshes::triSurfaceMeshes(Foam::IO object const&, Foam::List<foam::filename> const&)':
: undefined reference to `Foam::triSurface::triSurface(Foam::fileName const&)'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.text+0x1c97): In function `Foam::triSurfaceMeshes::triSurfaceMeshes(Foam::IO object const&, Foam::List<foam::filename> const&)':
: undefined reference to `Foam::triSurface::writeStats(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) const'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.text+0x299a): In function `Foam::triSurfaceMeshes::triSurfaceMeshes(Foam::IO object const&, Foam::List<foam::filename> const&)':
: undefined reference to `Foam::triSurface::triSurface(Foam::fileName const&)'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.text+0x2a27): In function `Foam::triSurfaceMeshes::triSurfaceMeshes(Foam::IO object const&, Foam::List<foam::filename> const&)':
: undefined reference to `Foam::triSurface::writeStats(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) const'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.gnu.linkonce.t._ZN4Foam14triSu rfaceMesh D0Ev+0x42): In function `Foam::triSurfaceMesh::~triSurfaceMesh()':
: undefined reference to `Foam::triSurface::~triSurface()'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.gnu.linkonce.t._ZN4Foam14triSu rfaceMesh D1Ev+0x42): In function `Foam::triSurfaceMesh::~triSurfaceMesh()':
: undefined reference to `Foam::triSurface::~triSurface()'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.gnu.linkonce.d.rel.ro._ZTVN4Fo am14triSu rfaceMeshE+0x90): undefined reference to `Foam::triSurface::movePoints(Foam::Field<foam::ve ctor<double> > const&)'
Make/linux64GccDPOpt/triSurfaceMeshes.o(.gnu.linkonce.d.rel.ro._ZTIN4Fo am14triSu rfaceMeshE+0x28): undefined reference to `typeinfo for Foam::triSurface'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1

Probably, it is a bug of my intallation. What do you think about it?

olesen December 11, 2007 11:14

The segfault is probably becau
 
The segfault is probably because you have difference size porousMedia object and somewhere, something was not rebuilt.

When you are rebuilding libraries, use 'wmake libso'. The error messages give you a good hint here (undefined reference to main).
Would you be able to get a support contract (eg, from OpenCFD)? The current problems are somewhat simple, but when you start with combustion etc, the problems are considerably more difficult and getting help from the forum will be more difficult.

The velocities in the porosity are the superficial velocities - you'll need to consider this when calculating the resistance values.

arkasshka December 11, 2007 12:41

Hi Mark Thank you very much f
 
Hi Mark
Thank you very much for your help and for your patience.
I have performed wmake libso and I have no errors. Errors appears when I do wmake meshTools. I have a long list of errors. The recompilation of all OpenFOAM does not help.
P.S. I have send the request about support. But... The OpenFOAM is my own initiative.((

olesen December 12, 2007 03:43

Since meshTools itself is obvi
 
Since meshTools itself is obviously not an application, I used 'wmake meshTools' as shorthand for one of the following:

cd $WM_PROJECT_DIR/src/meshTools && wmake libso
-or-
cd $WM_PROJECT_DIR/src && wmake libso meshTools

You might need to look at the wmake code to see what it means.

arkasshka December 12, 2007 04:46

Hi Mark Thank you for advice.
 
Hi Mark
Thank you for advice. I have done like you said. Both options work well. Still, I have segfault like:

Create mesh for time = 1000

Reading thermophysical properties

Selecting thermodynamics package hThermo<puremixture<sutherlandtransport<speciether mo<hconstthermo<perfectgas>>>> >
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model laminar

Starting time loop

End

#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFO AM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFO AM.so"
#2 ?? in "/lib64/tls/libc.so.6"
#3 ?? in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#4 ?? in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#5 std::string::_Rep::_M_dispose(std::allocator<char> const&) in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#6 std::basic_string<char,>, std::allocator<char> >::~basic_string() in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#7 Foam::PtrList<foam::porouszone>::~PtrList() in "/home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/applications/bin/linux64GccDP Opt/rhoExplicitPorousSimpleFoam"
#8 main in "/home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/applications/bin/linux64GccDP Opt/rhoExplicitPorousSimpleFoam"
#9 __libc_start_main in "/lib64/tls/libc.so.6"
#10 Foam::lduMatrix::lduMatrix(Foam::lduMatrix&, bool) at ../sysdeps/x86_64/elf/start.S:116
Segmentation fault
iwsta019@woody2:run>

Please, don't be angry.) I am just a beginner http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

olesen December 12, 2007 05:12

From the segfault and the stac
 
From the segfault and the stack trace, it looks like the PtrList<porouszone>::~PtrList() might be deallocating the wrong sized object.

1) try rebuilding your application (hoExplicitPorousSimpleFoam) with the correct headers.
2) Run the application with valgrid and see what it reports.

When doing the tests, reduce your runTime a few iterations (eg, 10) so you don't have to wait forever for the segfault.

If none of the above resolves the problem, you might just try ignoring it and hope for the best ;)

arkasshka December 12, 2007 05:42

How should I set up the correc
 
How should I set up the correct headers?

maría March 18, 2008 07:45

Hi Mark, I'm working with r
 
Hi Mark,

I'm working with rhoExplicitPorousSimpleFoam. I've got a question about the UEqn.H and hEqn.H implementation.

For instance, let's take UEqn.H:

*****************************************
/ Solve the Momentum equation

tmp<fvvectormatrix> UEqn
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi), U)
+ turbulence->divRhoR(U)
);
pZones.addResistance(UEqn());

UEqn().relax();

solve(UEqn() == -fvc::grad(p));
*******************************************

I suppose the second term of UEqn ("- fvm::Sp(fvc::div(phi), U)") is added for some numerical reason.But...to be honest, I don't find it out!
Could you please give a hint?

Thanks! :-)

MarŪa

olesen March 25, 2008 06:44

Hi Maria, The extra source
 
Hi Maria,

The extra source with fvc::div(phi) helps improve stability/convergence. When the mass residual tends to zero, it will disappear.

Much more importantly - you'll need the implicit porosity solver if the resistances are large, heavily anisotropic or not aligned with the global coordinates.

derkermit September 18, 2012 04:37

Porosity treatment in OpenFOAM
 
Sorry for reanimating this old topic again but I would like to know, what's the matter behind Olesen's statement:

Quote:

Originally Posted by olesen (Post 187250)
Much more importantly - you'll need the implicit porosity solver if the resistances are large, heavily anisotropic or not aligned with the global coordinates.

I'm creating a solver for fibrous porous media and therefore have to deal with anistropic permability. My calculations so far did run well as long as the pressure gradient doesn't get to high.

My solver is based on porousInterFoam (OF2.1.0) which uses the PIMPLE algorithm. There is no entry in "createFields" which detects if the porosity should be solved implicit or explicit. This seems to be an option which is only implemented in solvers with SIMPLE. Is that true?

And furthermore, why is the ddt-term "pZones.ddt(rho, U)" in the UEqn of porousInterFoam commented out? This prevents the solver from taking the porosity in account for the calculation. Why would that make sense and what if I recompile the solver with it?

EDIT: Ran the simulation with the pZones.ddt term and porosity of 0.45. There was no difference in flow propagation/speed at all. This is really confusing me! Any hinds?

Thanks in advance,
Alex

atoof November 20, 2012 03:10

Quote:

Originally Posted by arkasshka (Post 187235)
Hi Mark
Thank you very much for the answer. I am rather new in OpenFOAM, so my answers could seem a little bit silly.
About "por". I assume to use a por as parameter which describes the porosity and to multiply the divergence term in transport equation.
About the superficial velocity. Basically, I would like to develop a code which simulates combustion in a porous media. To do it I should have a real velocity rather than superficial. Brief explanation why. Here is as flow geometry:

| Free flow 1 |Porosity 0.05 | Free flow 2 |

In this case there is a region of high flow speed in the porous domain which prevents the propagation of the combustion wave to the domain Free flow 1. I have doubts that the assumption of superficial velocity will work in this case. What do you think about it?

Dear arkasshka

Sorry for remindering this old topic. I would like to know, did you finally develop a code which simulates combustion in a porous media and or at leat consider porosity to the convection term of momentum equation?

Thank you in advance,
Hossein


All times are GMT -4. The time now is 04:12.