CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Two porous zone buoyantSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Swagga5aur

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2017, 15:13
Default Two porous zone buoyantSimpleFoam
  #1
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10
dewey is on a distinguished road
Hi, somebody could tell me how to define two porous media, in diferents zones using fvOptions and buoyantSimpleFoam?
dewey is offline   Reply With Quote

Old   June 13, 2017, 16:59
Post
  #2
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Hello Alberto,
it depends on the mesh generation method and the geometry you want to apply the porous zones to.

I have made a 2d example case where toposetdict is used to defined two boxes where all cells within are a part of the individual porous zones.

Toposet is used as the mesh is generated with blockMesh, however, it may also be used in 3d for simple geometries. If snappyhexmesh was used instead for meshing the zone may already be defined and so the toposet part may be skipped.

Its attached to this post and let me know if you have any questions!
Attached Files
File Type: gz doublePorousbyouantSimpleFoam.tar.gz (8.8 KB, 43 views)
dewey likes this.
Swagga5aur is offline   Reply With Quote

Old   June 13, 2017, 18:59
Default
  #3
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10
dewey is on a distinguished road
Thank you for you reply!

I'm analyzing your simulation. could you explain me why you use calculated and value 0 in the interfaces (mappedWalls)?

porousity1_to_domain2
{
type mappedWall;
inGroups 1(wall);
nFaces 57;
startFace 3206;
sampleMode nearestPatchFace;
sampleRegion domain2;
samplePatch domain2_to_porousity1;
}

I am trying to do my simulation with CHT but when i split into my domains this "mappedWalls" appears and i dont know how to define in my /0 directory.

By the way, i did my mesh with ansys , i select my porous zones, named and export (.msh).
dewey is offline   Reply With Quote

Old   June 14, 2017, 04:18
Post
  #4
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
I am far from an expert but to my understanding, the Mapped walls type are similar to the wall type, the cellToRegion documents as well as domain folders are just dummy files (I usually use the cellToRegion folders for initial writing of boundary conditions as all patches are included in them.).

The mappedwalls are usually generated when surfaces doesn't align with the boundary patches or any other predefined patches.

This means that in the /0 directory you may apply your desired boundary condition to it as long as you use the correct patch name such as porousity1_to_domain2.

Note that for cellsets generated by toposet openFOAM writes these different domains and cellsets, generating the /0 boundary conditions in the sub folders of the generated sets. The interface boundary condition 'calculated' is not a physical boundary condition (such as noSlip), its just a boundary condition that specifies the value is derived from other fields.

The domain files and cellToRegion file in the folders before the Allrun script is executed are from my previous test that I forgot to delete, they have no effect.

Therefore, if the mappedwalls your domain generates are similar to those you see in my example (internal cell sets with values derived from other fields) you can use the calculated boundary condition for those fields.

I am not sure what you mean by CHT (compressible heat transfer?).
If you are able then please feel free to upload your case and I can have a look at it.

Sorry if my explanation is a bit messy hope it makes sense or else please let me know.
Swagga5aur is offline   Reply With Quote

Old   June 14, 2017, 12:25
Default
  #5
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10
dewey is on a distinguished road
chtMultiRegionSimpleFoam: Steady-state solver for buoyant, turbulent fluid flow and solid heat conduction with conjugate heat transfer between solid and fluid regions.

I am trying to simulate a pipe with heat transfer, this pipe has two obstacles, a porous medium, and a solid.

whit cht... you have to specify your domains (zones) and the bc as you did in your case in folders. And when i split this zones, a solid_fluid and porous_fluid are created(mappedWall). I´m gonna try with calculated, thanks. And sure, when i finish i share my case with u, thanks a lot, I am pretty new in this too.
dewey is offline   Reply With Quote

Old   June 14, 2017, 13:44
Post
  #6
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Ah was confused as you mentioned buoyantSimpleFoam originally, I believe (without looking at the geometry) that the solid_fluid is the patch connecting the solid obstruction and the internal fluid, which needs a heat transfer mechanism such as:

Code:
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        value           uniform 493;
        kappaMethod     fluidThermo;
        Tnbr            T;
With the fluidThermo specifying that the side of the patch is the fluid side, could be switched to solidThermo for the solid side of the patch.

Feel free to attach a figure if you want and good luck!
Swagga5aur is offline   Reply With Quote

Old   June 14, 2017, 19:15
Default
  #7
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10
dewey is on a distinguished road
sorry, i am trying to simulate mi case with cht solver,
what is the meanning of value (493) there? conductivity?
dewey is offline   Reply With Quote

Old   June 15, 2017, 03:05
Post
  #8
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
The value of 493 is just the initial temperature guess of the fluid at the connecting patch.
Swagga5aur is offline   Reply With Quote

Old   June 20, 2017, 15:33
Post
  #9
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
I have taken a look at your sent case, and I believe the issue with your code is connected with the mesh implementation in openFOAM.
The issue regards the implementation of the porousZone as the fluid domain should also be defined in the that region, applying a porous region to the set zone, not removing the domain from the fluid domain.

The approach with the solid is fine with a solid region making a gap in the fluid region.

With a single fluid region and solid region then I would create the porous region as I did in the previous example case in this thread.

Other issues I spotted in the code is boundary condition issues for the pressure and p_rgh fields.
Additionally, the code has a bad convergence of mass continuity when I run with buoyantSimpleFoam being due to the cells being mainly tetrahedral. I would suggest generating the STL file of the fluid region with the porous zone and making a STL file for the internal solid region if possible, as this will allow for a mesh generation with the use of snappyhexMesh(I'll help setting up the meshing procedure if you would like to use this method).

I don't think I can help you anymore with the current approach as I can't manipulate the mesh.

I have attached the boundary conditions and constant files I changed allowing you to see the difference.

Hope its of some help.
Attached Files
File Type: gz changes.tar.gz (16.9 KB, 11 views)
Swagga5aur is offline   Reply With Quote

Old   June 22, 2017, 13:36
Default
  #10
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10
dewey is on a distinguished road
Hi Lasse thanks a lot for your time, i am not trying to run my case with buoyanSimplefoam any more, now I am trying whit chtmultiregionSimpleFoam, and in the beginning i think that the mesh implementation of the porous zone was my problem, i did my mesh with Salome, and the porous region as you did with cellset and the error continues. the error that appears to me is the next:

--> FOAM FATAL ERROR:
cannot be called for a calculatedFvPatchField
on patch domain0_to_porousity1 of field U in file "/home/terofluidos/Documentos/cht/doublePorousbyouantSimpleFoam4/0/domain0/U"
You are probably trying to solve for a field with a default boundary condition.

From function Foam::tmp<Foam::Field<Type> > Foam::calculatedFvPatchField<Type>::gradientIntern alCoeffs() const [with Type = Foam::Vector<double>]
in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 187.

Well, actually this errors accurred to me too when i am trying to run your "doublePorousbyouantSimpleFoam" with chtmultiregionSimpleFoam following the tutorial "heatExchanger" from OF 4.1

i dont know why calculated can be used to buoyant but no to cht, or if i am doing something wrong :/

have you been able to run this simulation with chtmultiregionSimpleFoam?

This is the case modified.

https://mega.nz/#F!kVIDGSBL!4qQrrlykJ4A6ql7wMbk6HA
dewey is offline   Reply With Quote

Old   June 22, 2017, 16:26
Post
  #11
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Hello again Alberto,
I have now made the doublePorousbuoyantSimpleFoam case for chtMultiRegionSimpleFoam and attached it.

Just run the chtMultiRegionSimpleFoam command as I haven't updated the Allrun script for the solver.

https://mega.nz/#!oWpkxKDI!PkrWAZqSW...8jjM0twNSBx584

The reason for the code you sent didn't work was that you considered every single domain as an individual fluid zone, and the porous condition is not a fluid zone as such is a cellzone restricting condition on a fluidzone. Therefore, I took all the files put them into the fluid region folders which resulted in a single fluid zone with two porous regions inside it.

If you wish to solve the regions as multiple fluid zones you have to alter the porosity zones as well as the boundary conditions as the zones as of now aren't interconnected, which is required by the fvOptions porousity zone.

Let me know if there are any other questions.

Last edited by Swagga5aur; June 23, 2017 at 17:25.
Swagga5aur is offline   Reply With Quote

Old   June 23, 2017, 13:30
Default
  #12
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10
dewey is on a distinguished road
Hi Lasse thank you so much!

I cant download the files because i need the encryption key.

Could you send to me the link with the key?
dewey is offline   Reply With Quote

Old   June 23, 2017, 17:25
Post
  #13
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Ah sorry, I linked the wrong link, I updated it in the previous post and linked it again here https://mega.nz/#!oWpkxKDI!PkrWAZqSW...8jjM0twNSBx584.

Sorry for the inconvenience.
Swagga5aur is offline   Reply With Quote

Old   June 23, 2017, 17:26
Default
  #14
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10
dewey is on a distinguished road
Quote:
Originally Posted by Swagga5aur View Post
Hello again Alberto,
I have now made the doublePorousbuoyantSimpleFoam case for chtMultiRegionSimpleFoam and attached it.

Just run the chtMultiRegionSimpleFoam command as I haven't updated the Allrun script for the solver.

https://mega.nz/#!oWpkxKDI!PkrWAZqSW...8jjM0twNSBx584

The reason for the code you sent didn't work was that you considered every single domain as an individual fluid zone, and the porous condition is not a fluid zone as such is a cellzone restricting condition on a fluidzone. Therefore, I took all the files put them into the fluid region folders which resulted in a single fluid zone with two porous regions inside it.

If you wish to solve the regions as multiple fluid zones you have to alter the porosity zones as well as the boundary conditions as the zones as of now aren't interconnected, which is required by the fvOptions porousity zone.

Let me know if there are any other questions.

Thank you!
dewey is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modelling Combustion in Porous Zone tanjinjack FLUENT 2 September 26, 2016 05:10
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 10:28
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 11:52
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 18:51
Problem in IMPORT of ICEM input file in FLUENT csvirume FLUENT 2 September 9, 2009 02:08


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