CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to set up a case for porousSimpleFoam and make it work with openFoam ?? (http://www.cfd-online.com/Forums/openfoam-solving/129865-how-set-up-case-poroussimplefoam-make-work-openfoam.html)

Mahmoud_aboukhedr February 14, 2014 13:02

How to set up a case for porousSimpleFoam and make it work with openFoam ??
 
Am a beginner in using openfoam and am trying to use the porousSimpleFoam for simple shape geometry (box)with 3 zones (inlet_zone, porous_zone, outlet_zone) I need to assign artificial porosity to the porous zone but I can not find any detailed info for the solver as the definition for e1 and e2 vectors or how to add permeability and also how to calculate the number of steps and I tried to copy the case as in the tutorial for the angledDuctImplicit and run it with random numbers for vectors e1=(1 0 0) and e2( 0 1 0) and the solver is not working with my anyway and gives this errors ...

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/porousSimpleFoam"
#8 Foam::fvMatrix<double>::solve() in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/porousSimpleFoam"
#9
in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/porousSimpleFoam"
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11
in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/porousSimpleFoam"
Floating point exception (core dumped)


Any one can give steps for seting this case!!!!!

lramutti May 20, 2014 16:14

Hey Mahmoud,

I came across the same error and I saw your post. Seems like it has been a while since you came across this problem but yet I believe that it would be good to share a possible justification for this problem.

1. Dealing specifically with the problem you are facing, be very careful with the fvSolution script.

Code:

#3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"[*]#4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"[*]#5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
For my particular case study I solved the issue mentioned above by changing the relTol from 0 to 0.1. As previously stated, this error occurs because the relTol has been set to 0. In other words, the solved parameter is not changing per iteration. I believe this is the case for your problem, as it was for mine.

2. When OpenFOAM prints sigFpe is that something is being divided by zero. This is not always the case but still we must be cautious with the values used. In case you are divided something by zero make sure to make it infinitesimally small (i.e. 0.01) and run the solver again.

3.In case dividing by zero is not the problem make sure that your case study is consistent. With that being said, I strongly advice you to keep track of the names used to define each domain. Sometimes a simple typo can make debugging a pain.

4. Consider making modifications to your controlDict script in order to get it to work smoothly. The reason I say so is so that you can stipulate a Courant number that will not blow up the simulation.

Hope it works out for you or for others who come across this issue.

Cheers

Lucas

lramutti May 20, 2014 17:02

Hey Mahmoud,

Try using this controlDict script instead. It works for me.

Code:

application    chtMultiRegionFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        5000;

deltaT          1;//0.11;

writeControl    runTime;

writeInterval  0.05;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

adjustTimeStep true;

maxCo 0.5;

Depending on how your simulation goes it can be quite handy to reduce the maxCo to 0.3~0.4.

Cheers

Lucas

Mahmoud_aboukhedr September 4, 2014 10:30

thanks a lot


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