CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Coupling two unequal dimension meshes.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 23, 2013, 05:13
Default Coupling two unequal dimension meshes.
  #1
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 43
Rep Power: 4
RaghavendraRohith is on a distinguished road
Hi All

I am trying to couple two different meshes with each other which are of different dimensions but this doesnt work .

Mesh 1 is 7x5x1 units

Mesh 2 is 5x5x1 units

Mesh 2 will be the all the center at the mesh 1 with leaving one unit length on each side.



I am trying to solve a heat transfer between. But as the total control volumes are different the computation doesnt run

I have tried meshTOMesh tool evenbut this doesnt work.

Then , I have tried to use mesh 2 of the same size as mesh 1 then it works

For this reason i have used a baffle to the mesh2 which is now geometrically equal as mesh 1 but i am found with error of declaration in compressible baffle.

As i have used the same case in incompressible with baffles and it works How is the compressible baffle different from the incompressible case.


Question 1 : Can some body tell me how can i merge( just to place mesh2 at center of mesh1 but not real merging) two meshes with different dimensions ?

Question2 : What is a better way to use a baffle for a compressible flow which doesnt belong to fluid mesh?

Last edited by RaghavendraRohith; July 23, 2013 at 11:08.
RaghavendraRohith is offline   Reply With Quote

Old   July 24, 2013, 06:05
Default
  #2
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 43
Rep Power: 4
RaghavendraRohith is on a distinguished road
Hi

Code:
Create time

Creating meshes

    Creating fluid mesh

    Creating fluid mesh

Creating meshes

    Creating solid mesh


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field T     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field T     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001


SIMPLE: no convergence criteria found. Calculations will run for 10000 steps.

Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading field U

    Reading/calculating fluid face flux field

    Reading/calculating fluid face flux field

Creating turbulence model

Selecting RAS turbulence model laminar
Creating turbulence model

Selecting RAS turbulence model laminar
Reading field variables and transport properties

    Reading fluid specific heat

    Reading fluid thermal conductivity

    Reading vhtc

Reading field variables and transport properties

    Reading fluid specific heat

    Reading fluid thermal conductivity

    Reading vhtc

Reading field variables and transport properties

    Reading solid temperature field

    Reading solid density

    Reading solid specific heat

    Reading solid thermal conductivity

Reading thermophysical properties

Constructed constSolidThermo with
    rho        : rho [1 -3 0 0 0 0 0] 8000
    Cp         : Cp [0 2 -2 -1 0 0 0] 450
    K          : K [1 1 -3 -1 0 0 0] 80
    Hf         : Hf [0 2 -2 0 0 0 0] 0
    emissivity : emissivity [0 0 0 0 0 0 0] 0
    kappa      : kappa [0 -1 0 0 0 0 0] 0
    sigmaS     : sigmaS [0 -1 0 0 0 0 0] 0

Selecting baffle model none
Creating porous zone: porosity
Selecting thermalModel none
Creating porous zone: porosity
Selecting thermalModel none
Creating porous zone: porosity
Selecting thermalModel none
Using pressure implicit porosity
Using pressure implicit porosity
Using pressure implicit porosity

Starting time loop


Time = 2

GAMG:  Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
rho max/min : 0.06 0.06
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  
 at sigaction.c:0
#3  Foam::tmp<Foam::GeometricField<Foam::typeOfSum<double, double>::type, Foam::fvPatchField, Foam::volMesh> > Foam::operator-<double, double, Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/mRCPorousSimpleFoam"
#4  
 in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/mRCPorousSimpleFoam"
#5  __libc_start_main in "/lib64/libc.so.6"
#6  
 in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/mRCPorousSimpleFoam"
Speicherzugriffsfehler (Speicherabzug geschrieben)
Here is the failure message.Can somebody help from this?


But the same case works when i dont create baffles and gives me approximately what i want. But i need to create baffles

Thank you in Advance
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   June 13, 2014, 02:59
Default
  #3
New Member
 
Detian Liu
Join Date: Mar 2013
Location: Beijing, P.R.China
Posts: 20
Rep Power: 4
Detian Liu is on a distinguished road
Dear Rohith,
I am recently studying about the mesh mapping, I have a simple question, and hope get some help from you. That is how to create 2 different meshes in one case, such as fluid mesh and solid mesh you mentioned before.
Thanks a billion.

Detian
2014.6.13
Detian Liu is offline   Reply With Quote

Old   June 13, 2014, 03:20
Default
  #4
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 43
Rep Power: 4
RaghavendraRohith is on a distinguished road
Hi Detain

Actually you need to make everything a double set in your solver. Velocity, Temp, Mesh, Transport properties etc.

When you actually see the .C file of the solver, you find a createmesh.H you can copy it twice naming the other mesh as mesh2 for example and its file as for eg: createmesh2.H then the fields in this mesh are renamed .

In this way you can make this possible

Hint : But if the meshes are overlapping meshes see this cell refinement on the overlapping zone is the same.

All the best
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   June 13, 2014, 03:27
Default
  #5
New Member
 
Detian Liu
Join Date: Mar 2013
Location: Beijing, P.R.China
Posts: 20
Rep Power: 4
Detian Liu is on a distinguished road
Dear Rohith,
Thank you for the quick and detailed reply. I will try to realize it immediately.
Thank you!!!

Best wishes
Detian
2014.6.13
Detian Liu is offline   Reply With Quote

Old   June 13, 2014, 22:32
Default
  #6
New Member
 
Detian Liu
Join Date: Mar 2013
Location: Beijing, P.R.China
Posts: 20
Rep Power: 4
Detian Liu is on a distinguished road
Dear Rohith,
I am still have a little confusion, when I add createMesh.H twice in .C like this:
#include createMesh.H
#include createMesh2.H
It seems both createMesh.H and createMesh2.H only read the mesh from /constant/polyMesh/, still create the same mesh. So what parameters I have to modify to make different .H read mesh from different file, so that they could create different mesh. Is that ture to modify Foam::fvMesh::defaultRegion? Or I have to create different blocks in blockMeshDict?



// createMesh.H
// ~~~~~~~~~~~~

Foam::Info
<< "Create mesh for time = "
<< runTime.timeName() << Foam::nl << Foam::endl;

Foam::fvMesh mesh
(
Foam::IOobject
(
Foam::fvMesh::defaultRegion,
runTime.timeName(),
runTime,
Foam::IOobject::MUST_READ
)
);

Thanks again for all the help!
Best wishes!
Detian
2014.6.14
Detian Liu is offline   Reply With Quote

Old   June 14, 2014, 03:51
Default
  #7
New Member
 
Detian Liu
Join Date: Mar 2013
Location: Beijing, P.R.China
Posts: 20
Rep Power: 4
Detian Liu is on a distinguished road
Dear Rohith,
I have already fixed the problem with the "region" option.
Thank you for the help!
Best Wishes!
Detian
2014.6.14
Detian Liu is offline   Reply With Quote

Old   June 14, 2014, 11:40
Default
  #8
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 43
Rep Power: 4
RaghavendraRohith is on a distinguished road
Hi Detain

As i told you before. You need to create new mesh and also its new fields eg : new flux (phi), vector and scalar fields. infact a complete set of all variables should be created in a new create fields files. And also New Ueqn, Teqn, Peqn should be created with governing equations. and then they need to be implemented and included in the solver.C file.

chtmultiregionfoam is a standard solver which is similar of this kind. look into it in heattransfer folder of standard solvers.

You will get an idea

All the best

Have fun
Rohith
RaghavendraRohith is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remeshing_ ANSYS 14.0_ System Coupling acdesa ANSYS 3 February 25, 2013 11:09
Hex and Tet meshes - simplefoam comparison danvica OpenFOAM Running, Solving & CFD 10 January 4, 2013 02:18
Coupling equations by mapping between 2 different meshes benk OpenFOAM 0 March 16, 2010 16:38
Coupling meshes in v15 canfield OpenFOAM Running, Solving & CFD 0 December 22, 2008 09:14
one/two way coupling of DPM Angela FLUENT 3 April 28, 2008 09:29


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