|
[Sponsors] |
Simultaneous fine and course Meshes for two parts of a solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 26, 2013, 02:56 |
Simultaneous fine and course Meshes for two parts of a solver
|
#1 |
New Member
Masoud Ami
Join Date: Sep 2013
Posts: 15
Rep Power: 13 |
Hello All.
I have built a solver which solves turbulent mixed convection flow and Radiation heat transfer in a vertical parallel plates channel. Does anyone know that how we can set different meshes for these two parts? I mean because radiation doesn't need a very fine mesh, can we set a course mesh for solving RTE and at the same time a fine mesh for flow part? As you may know, after each iteration in RTE solution, result goes to energy equation via source term. Then the flow equations are solved for one iteration and this procedure goes on. Best Regards, Mas |
|
December 28, 2013, 18:55 |
|
#2 |
New Member
H. Kriete
Join Date: Dec 2013
Posts: 4
Rep Power: 12 |
The standard solvers don't allow calculating different mechanisms on different meshes.
But if you are writing your own solver, you can calculate radiation on a coarse mesh, interpolate (and smooth) it onto the fine mesh, calculate the flow on the fine mesh and interpolate it back onto the coarse mesh. Repeat both interpolations in each time step. Helge |
|
December 29, 2013, 07:50 |
|
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Mas,
First of all, yes it is possible, but it will require a substantial amount of work to get it running. A couple of things you should consider are: 1. Is the radiation part so expensive that it will substantially speed up the execution to work with two meshes? 2. If yes, you should carefully consider how to implement the mesh coupling, such that you will experience a seemless execution in parallel. This will be the part, which will require a careful analysis prior to any implementation, and it might also require quite some additional pre-processing and runTime utilities/functionalities. I am not saying this to scare you, but depending on your expertise in C++/OpenFoam libraries, this will be a potential very time consuming task to undertake. Alternatively, you should seek professional guidance. Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
December 30, 2013, 07:47 |
Mesh SubSet eventual solution?
|
#4 |
Senior Member
|
Hi Mas,
I do not know which version of OF you are using. But some time ago I heard about the possibility of using meshSubSet from OF 1.6-ext for similar purposes. Maybe this helps a bit on that way? Then probably you would not have to redo stuff others already have completed... Cheers, Bernhard |
|
January 4, 2014, 04:56 |
|
#5 |
New Member
Masoud Ami
Join Date: Sep 2013
Posts: 15
Rep Power: 13 |
Dear Helge, Niels and Bernhard
Hello guys and thanks a lot for your comments. By the way, do you know the steps I should follow in order to make it work? Actually, my case is not very time consuming because I have used RANS but the run time gradually becomes higher when I change the radiation model (DOM) to its higher schemes. I wanted to find if that method can help me to reduce the run time especially for my future studies on complicated geometries. Moreover, I have added radiation to existing buoyantBoussinesqSimpleFOAM. Therefore I haven't written the code from the scratch. Helge, as you said I can't add that concept to this solver. Did I get your point?! Bernhard, do you know the exact use of the meshsubset? I appreciate if you please tell me briefly the steps I should follow to implement this feature in openFOAM. Thanks again guys. Greatest Regards, Mas |
|
January 4, 2014, 05:58 |
|
#6 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Mas,
Note that the fvMeshSubset, as pointed to by Bernhard, does only support working on a subset of the computational domain (a different volume) and therefore not with a coarsening of the mesh, while still covering the same volume. Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
January 10, 2018, 03:12 |
|
#7 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
Hi Mas
I want to develop a solver similar to yours. I am working with interFoam or sclsVOFFoam and want to solve the alpha equations in a fine mesh and the fluid flow equations in a coarse mesh. I am just beginning in this direction so any help or suggestions that you can give ? |
|
January 10, 2018, 22:42 |
|
#8 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
It can be done, however, once you start mapping fields from one mesh to another one, you might introduce errors.
Solving flow on one mesh and radiative heat transfer on the other one, as the original poster suggested, seems quite feasible. In a VOF solver, solving for alpha one one mesh and all the rest on another one seems to me as asking for too much trouble. Anyway, OpenFOAM has everything on-board to make a solver work on several meshes, as in the cht* solvers. The image attached is from some proof-of-idea tinkering: flow is solved on a fine mesh, scalar transport on a coarser one. |
|
January 11, 2018, 03:00 |
|
#9 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
Thanks , the image is exactly what I was looking for.
I went through the chtMultiRegionFoam solver also. It seems I am able to solve my problem if I create a cellset for all the cells in fine mesh and another cellset for all the cells in coarse mesh. But how to do that? I can create two overlapping blocks; one with fine mesh and other with coarse. When I use toposet to create the cellset it selects all the cell i.e combining the cells of fine mesh and coarse mesh. |
|
January 11, 2018, 04:34 |
|
#10 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
You don't need two blocks, you need two meshes. And you don't need topoSet at all - the cht* examples just use cellSets to split the meshes.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
May 8, 2018, 06:44 |
|
#11 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
Hi All,
I make a model for solving different PDE in different grids using mapField utility of OpenFoam. This work as following: #!/bin/sh cd testFoam_cavity; //case folder of coarse mesh blockMesh; for ((i=0;i < 100;i=i+1)) { cd ../testFoam_cavityfine_scalar //case folder of fine mesh mapFields ../testFoam_cavity -consistent cd ../testFoam_cavity testFoam //solver same as icoFoam i.e. solving NS equation and energy equation is commented cd ../testFoam_cavityfine_scalar testFoamScalar //solver for energy equation and NS equation is commented cd ../testFoam_cavity mapFields ../testFoam_cavityfine_scalar -consistent } It works fine in terms of result but the way is inefficient as It requires reading mesh too many times in one timeStep. Any suggestions to improve it. Thanks |
|
|
|