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/)
-   -   Problem with porous media (https://www.cfd-online.com/Forums/openfoam-solving/165749-problem-porous-media.html)

Lisl January 25, 2016 05:31

Problem with porous media
 
1 Attachment(s)
Hello foamers,

I have a Problem with my porousSimpleFoam case. In the attached Picture you can see a cylinder located in a box. I want to generate a flow through the box. The cylinder has a porosity i defined in porosity properties. My Problem is that OpenFoam seems to ignore my porous media because there is no velocity in the cylinder (i can see that when i do a plot over line for the velocity in paraView)

The box and the cylinder are two different meshes. I generated both with snappyHexMesh and merged them into one case for my simulations with porousSimpleFoam..
Do you think there could be a Problem?

Thanks!

wyldckat January 31, 2016 13:51

Quick answer: If you only merged the two meshes, then they are technically considered by OpenFOAM has being two completely independent regions, even if they are overlapped over each other.

You will need to use one of the following solutions:
  1. Stitch the two meshes together, which requires that the two meshes complement each other.
  2. To use AMI boundary conditions, for establishing the boundary connections between each mesh.
  3. To mesh the two regions in a single meshing operation, where the internal cylinder is meshed as a cellZone and the porosity is later assigned with an fvOption.
  4. To follow the same case set-up as the tutorial "heatTransfer/chtMultiRegionSimpleFoam/heatExchanger" that is available at least since OpenFOAM 3.0.

Lisl February 1, 2016 03:56

Thank you very much for your quick answer!

I tried the stitchMesh Utility but i get the following error:


--> FOAM FATAL ERROR:
Points on patch sides do not match to within tolerance 5.39231e-06


OpenFOAM thinks the meshes don't complement each other, am i right?
Where can i Change the tolerance of stitchMesh? I can't find something about that...


For better understanding my case: My box and my cylinder were first overlapping each other( like in my Picture above)
But for using stitchMesh i meshed my box without the volume of my cylinder and meshed my cylinder seperatly so that i can put both meshes together with mergeMeshes. I did that so that i get two patches i can put together.
What am i doing wrong?


my boundary after merging:

zylinder // patch from box without volume of cylinder
{
type patch;
nFaces 8880;
startFace 870467;
}
porosity
//patch from cylinder merged into box
{
type patch;
nFaces 19802;
startFace 879347;
}


Lisl February 3, 2016 03:31

I found a toleranceDict and changed some values (made the tolerances larger)
But the error is still there.
I executed stitchMesh with

stitchMesh -perfect -toleranceDict (nameDict) masterPatch slavePatch

Here are the entries for my toleranceDict:


pointMergeTol 0.3;

edgeMergeTol 0.0201;

nFacesPerSlaveEdge 5;

edgeFaceEscapeLimit 10;

integralAdjTol 0.8;

edgeMasterCatchFraction 0.4;

edgeCoPlanarTol 0.8;

edgeEndCutoffTol 0.0001;

What am I doing wrong?
Can please someone give me a hint??

Thanks!

wyldckat February 21, 2016 14:32

Quick answer: Sorry for the late reply, but without access to the case, there isn't much I can do.

Nonetheless, I did look into similar cases several months ago and they are all documented here: http://www.cfd-online.com/Forums/ope...mesh-used.html - please study the content of that thread! If after reading it all you still can figure it out, please provide access to your case, even if it has to be through a DropBox or Google Drive link provided via private message.

svramana February 18, 2018 03:42

1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 583131)
Quick answer: If you only merged the two meshes, then they are technically considered by OpenFOAM has being two completely independent regions, even if they are overlapped over each other.

You will need to use one of the following solutions:
  1. Stitch the two meshes together, which requires that the two meshes complement each other.
  2. To use AMI boundary conditions, for establishing the boundary connections between each mesh.
  3. To mesh the two regions in a single meshing operation, where the internal cylinder is meshed as a cellZone and the porosity is later assigned with an fvOption.
  4. To follow the same case set-up as the tutorial "heatTransfer/chtMultiRegionSimpleFoam/heatExchanger" that is available at least since OpenFOAM 3.0.

Hello Bruno,
I am doing case similar to the one specified above.

my goal is to simulate "Incompressible Flow and heat transfer from a heated(const.Temp Tw) porous cylinder to flowing wind( temp. Tf).
The computational domain appended as below
After going through similar threads on this forum, i wanted to create customized solver to run my simulation
and I did the following steps for simulation.

Solver modification
Code:

  1. created OF/user(.OFversion)/application/solver directory

  2. Copied PisoFoam solver from installation directory(i want to to transient simulation)

  3. renamed as "my_porousPisoFoam" with relevant modifications

  4. included the porosity as momentum sink in UEqn.H

  5. New TEq.H created and included in my_porousPisoFoam.C & defined "T" as VolScalarField  and "DT" as dimensinedScalar in  "createField.H"

  6. compiled as new solver with "Wclen&wmake " in make folder


compilation was done without errors
Case simulation
Code:

  1. Created domain(single) using blockMesh.

  2. Porous cylinder defined as porous zone  using "topSet"

  3. Assigned porosity (Darcy-Forchheimer model) using "fvOptions"

  4. Assigned Fixed temp.(Tw) using "scalarFixedValueConstraint" to the porouszone.


i wanted to run the simulation for 200 sec to validate for the following literature values
Code:

Flow and heat transfer parameters considered
Re 40
Darcy no (Da ): 10e-2
porosity value: 0.993
Pr :0.71

i have calculated the Drag and lift coefficients using "postprocessing utility "forcecoeffcient" and

Nusselt number through Paraview in following steps

Code:

  1. load the case in praview and select porous zone and "T" from pipeline browser/advance toggle options.

  2. run the simulation till last step and "apply"

  3. calculate derivatives(gradT)

  4. calculator to calculate "Nu" on all four faces and plot the variation along the length of porouszone


"i have no idea how to write the code to calculate local and average Nusselt Number for the porous cylinder (as i have defined cylinder as porous zone and the interaction between fluid and cylinder is "interface" there is no wall/patch to extract the values")

Cd and "Nu" values are not matching with the literature values.i am clueless what went wrong in my case setup i am struck i need help to proceed further.
case,solver and literature is enclosed for your advise.
https://www.dropbox.com/sh/16iu1o6mn...z4l_ApTia?dl=0

wyldckat March 7, 2018 15:36

Quick answer: I don't have enough time to look into this myself, but please check the cases and reports that are available here: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/ - I believe that there are at least a examples there on heat sources and porosity sources.

svramana March 20, 2018 01:27

Heat transfer from PorousZone
 
Quote:

Originally Posted by wyldckat (Post 684268)
Quick answer: I don't have enough time to look into this myself, but please check the cases and reports that are available here: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/ - I believe that there are at least a examples there on heat sources and porosity sources.

Bruno,
i have gone through the link ,unfortunately i did not find any clue regarding porous heat transfer related case.

Flow is incompressible Re=40,Pr=0.7

Code:

My problem here is to simulate heat transfer between fluid at say 283K and porous zone at 343k.
The flow is modeled as single domain and porous zone is defined here as flow resistance(Darcy -Forchheimer model) by adding addional sink term to N-S equations

  1. Average Nusselt number on porous zone surface is not effected by variation of porosity values( inertial and viscous resistance ).
  2. Do i need to define thermal boundary conditions at the fluid -fluid interface(internal faces/no physical boundary).
Regards,
Ramana

Swagga5aur March 20, 2018 10:49

Porous heat transfer model
 
Hello Ramana,

I have developed a solver that handles heat transfer between porous media and surrounding fluid in a single domain approach with solver determined Nusselts number, Reynolds number and heat transfer coefficient.

The sovler is attached in the following link:
https://www.dropbox.com/s/affha5r5ht...am.tar.gz?dl=0

You may be able to use some the code, the relevant part for you is in the reactor region of the solver, with EEqn and TcEqn being the fluid and porous media solvers.

I would implement the same approach in your solver and assign the epsilon to be 1 for the entire domain except in the porous region, with the issue being the implementation of the external heat transfer from the outer surface to the porous absent domain.

I'll attach an example when I get to my home computer but the above link should be sufficient for an approach of your own.

Note its for openFOAM V4.

Note I have not immensely tested it and I have some issues exist with the AoV scale vs the heat transfer coefficient unit in the solver, but I'm looking into it.

svramana March 21, 2018 00:52

Quote:

Originally Posted by Swagga5aur (Post 685902)
Hello Ramana,

I have developed a solver that handles heat transfer between porous media and surrounding fluid in a single domain approach with solver determined Nusselts number, Reynolds number and heat transfer coefficient.

The sovler is attached in the following link:
https://www.dropbox.com/s/affha5r5ht...am.tar.gz?dl=0

You may be able to use some the code, the relevant part for you is in the reactor region of the solver, with EEqn and TcEqn being the fluid and porous media solvers.

I would implement the same approach in your solver and assign the epsilon to be 1 for the entire domain except in the porous region, with the issue being the implementation of the external heat transfer from the outer surface to the porous absent domain.

I'll attach an example when I get to my home computer but the above link should be sufficient for an approach of your own.

Note its for openFOAM V4.

Note I have not immensely tested it and I have some issues exist with the AoV scale vs the heat transfer coefficient unit in the solver, but I'm looking into it.

Hello Lasse,
i wanna submit my thesis this month end ,i don't want to try new solver at this point .i have done some modifications and developed a solver for my case. The only problem being the heat transfer between fixed temperature porous zone and fluid.i will be glad if you can help me in this

The solver and test case can be found here
https://www.dropbox.com/s/l9nzgqjwc2...er.tar.gz?dl=0


Regards,
Ramana


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