CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] splitMeshRegions does not create interface patch between regions (https://www.cfd-online.com/Forums/openfoam-meshing/219946-splitmeshregions-does-not-create-interface-patch-between-regions.html)

fsan August 16, 2019 10:34

splitMeshRegions does not create interface patch between regions
 
Hello,

Here's my problem, I'm trying to do a simulation with chtMultiRegionFoam to check the thermal evolution in the surface of a pipe.
The geometry contain a fluid region with relatitive cold methan, around it a solid region for the pipe and arounnd the pipe a fluid region for hot air.

The mesh was created on the Ansys Workbench (spaceClaim and fluent meshing) and was import to openFoam with the "fluent3DMeshToFoam" command.

Then when I try to split the mesh into different region by typing
in the terminal:

Code:

splitMeshRegions -cellZones -overwrite
The three different region are well recognize but no interface patch are created (like "fluidToSolid" and "solidToofluid") as you can see in the output given in the terminal:

Code:

Create time

Create mesh for time = 0

Creating single patch per inter-region interface.

Trying to match regions to existing cell zones.


Number of regions:3

Writing region per cell file (for manual decomposition) to "/media/ubuntu/DATAS/Run/Coude/Coudemsh3/constant/cellToRegion"

Writing region per cell as volScalarField to "/media/ubuntu/DATAS/Run/Coude/Coudemsh3/0/cellToRegion"

Region        Cells
------        -----
0        6867
1        37308
2        142547

Region        Zone        Name
------        ----        ----
0        0        fff-solid-pipe
1        1        fff-fluid-pipe
2        2        fff-fluid-air

Sizes of interfaces between regions:

Interface        Region        Region        Faces
---------        ------        ------        -----

Reading geometric fields

Reading volScalarField cellToRegion


Adding patches


Adding patches


Region 0
--------
Creating mesh for region 0 fff-solid-pipe
Testing:"/media/ubuntu/DATAS/Run/Coude/Coudemsh3/system/fff-solid-pipe/fvSchemes"
Mapping fields
Mapping field cellToRegion
Deleting empty patches
Writing new mesh
Writing addressing to base mesh
Writing map pointRegionAddressing from region0 points back to base mesh.
Writing map faceRegionAddressing from region0 faces back to base mesh.
Writing map cellRegionAddressing from region0 cells back to base mesh.
Writing map boundaryRegionAddressing from region0 boundary back to base mesh.

Region 1
--------
Creating mesh for region 1 fff-fluid-pipe
Testing:"/media/ubuntu/DATAS/Run/Coude/Coudemsh3/system/fff-fluid-pipe/fvSchemes"
Mapping fields
Mapping field cellToRegion
Deleting empty patches
Writing new mesh
Writing addressing to base mesh
Writing map pointRegionAddressing from region1 points back to base mesh.
Writing map faceRegionAddressing from region1 faces back to base mesh.
Writing map cellRegionAddressing from region1 cells back to base mesh.
Writing map boundaryRegionAddressing from region1 boundary back to base mesh.

Region 2
--------
Creating mesh for region 2 fff-fluid-air
Testing:"/media/ubuntu/DATAS/Run/Coude/Coudemsh3/system/fff-fluid-air/fvSchemes"
Mapping fields
Mapping field cellToRegion
Deleting empty patches
Writing new mesh
Writing addressing to base mesh
Writing map pointRegionAddressing from region2 points back to base mesh.
Writing map faceRegionAddressing from region2 faces back to base mesh.
Writing map cellRegionAddressing from region2 cells back to base mesh.
Writing map boundaryRegionAddressing from region2 boundary back to base mesh.
End

The problem is that I can't use the "compressible::TurbulentTemperatureCoupledBaffleMi xed" or the "compressible::TurbulentTemperatureRadCoupledMixed " boundary condition, this mean that I have one same patch contained in two different region.

Even if I try to launch my simulation, I have the folowing fatal error: " not type 'mappedPatchBase' ".
I tried to replace in the polymesh the 'wall' by 'mappedWall' but it's still not working.

I would like to ask if some of you know how I can create those interface patch? If there is a command that can help to separate the patch shared by two region in two or any other clue.

Thank you

mwaqas August 22, 2019 04:54

Hello Fsan,


This problem occurs when you have non-conformal mesh in Ansys. Make a conformal mesh in Ansys and you will get a mappedWall.


Regards

fsan August 23, 2019 05:20

2 Attachment(s)
Hello Muhammad,
Thank you for you reply, I did check if the mesh was non-conformal or not but it look like a conformal mesh for me.

I upload some screen of the different region separation so you can all tell me what you think about it. The green and red region are fluid while the white region is a solid.
I can also upload the msh file if needed.

Thank you

mwaqas August 23, 2019 05:37

The mesh is conformal.

Then, there might be a problem with your BC.



Can you please upload your BC file (0/P or U, wherever is the problem) as well as your polyMesh/boundary file of problematic regions.


Probably, you are not giving correct BC.


Regards

fsan August 23, 2019 08:39

3 Attachment(s)
Alright I upload the boundary files for each of the region (fluidAir, fluidNG and solid). And I'll post just below the boundary condition for U:

For the fluid air region:
Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  dev
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0/fff-fluid-air";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 1 -1 0 0 0 0 ];

internalField  uniform (0 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inlet-air
    {
        type            fixedValue;
        value          uniform (-0.15 0 0);
    }
    outlet-air
    {
        type            pressureInletOutletVelocity;
        value          $internalField;
    }
    wall-fff-fluid-air
    {
        type            noSlip;
    }

    wall-fff-fluid-air-fff-solid-pipe
    {
        type            noSlip;
    }

}

// ************************************************************************* //

And for the fluid Natural Gas region:
Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  dev
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0/fff-fluid-pipe";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 1 -1 0 0 0 0 ];

internalField  uniform (0 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inlet-gas
    {
        type            fixedValue;
        value          uniform (0 0.15 0);
    }
    outlet-gas
    {
        type            pressureInletOutletVelocity;
        value          $internalField;
    }
    wall-fff-fluid-pipe-fff-solid-pipe
    {
        type            noSlip;
    }
}


The main problem I think is during the generation of the interface patch (solid_to_fluid and fluid_to_liquid) when i execute:

Code:

splitMeshRegions -cellZones -overwrite
As I don't get the mappedWall boundary condition for my T field where I need to use it, I can't use it afterward.
And I don't know what other BC I could use for the T fields instead of the coupled BC.

Thank you for your help.

mwaqas August 23, 2019 10:09

You are not getting any coupled wall during mesh conversion. I had this problem once when I had exported Ansys mesh to Openfoam. It was due to the non-conformal mesh. As I wasn't having any coupled wall in Ansys meshing.
It is looking like to me that you don't have coupled wall in Ansys meshing (because if there would be a coupled wall, you would have automatically got in OpenFOAM ).
You can do these things:


1) Check in fluent if your interface type is coupled or not. I suspect, it wont be.
2) Create coupled interface and then export to OpenFOAM.


Regards

fsan August 23, 2019 10:35

Thank you again for your reply.

I can't have acces to fluent now but when I will, I'll tell here if it would work or not.

Regards

fsan August 27, 2019 11:18

Hi Muhammad,

Naming each side of the interface in fluent did make the job, openFoam now recognize my interface and patch them. Thank you for the help.

Unfortunately, right now my simulation is not working as I wish, certaintly because of the BC, the scheme or the thermophysical model I don't know yet.

Regards

eugenioS March 9, 2022 04:30

No interface found with spliMeshRegions
 
Dear All,

I am currently facing a very similar problem to the one that you describe here.

Starting from a multi-region unstructured mesh built with ICEMCFD and exported in *.msh format, I'm importing it to openfoam using fluent3DMeshToFoam (fluentMeshToFoam not working). The import is performed correctly, however, when I employ splitMeshRegions to generate my subdomains, the interface patch is not recognized.

The 3D mesh is apparently completely mapped, and I've tried with several way of dealing with the interface, e.g. with or without prism layer, or even with a mostly mapped structured mesh.

I have tested splitMeshRegions with several different flags but the results is the same.

The version that I employ is v2012.

Do you know from where the problem might come?

Thank you in advance for your valuable advise

Dr. Eugenio Schillaci

Hr_kules March 30, 2022 07:09

Hey Eugenio,

i faced a similar problem and solved it by using the createPatch dict and take the boundaries that i want to have mapped and directly write them in the file, the result is pretty much the same as with the automatically generated patches.

keitaro7_14 June 6, 2022 05:56

You can follow those 2 Youtube Video to understand the procedure:

https://www.youtube.com/watch?v=04uqs6ERJa4

https://www.youtube.com/watch?v=NjUtTvzVULA

Result:
https://youtu.be/qdGUBnPqx7o

At least in Salome it is the proper way to do it. you have to create a Partition of the solids in order to create an unique entity. Afterwards, define the external boundary only (Group of Faces) and the solids (Group of Volumes).

That's all.


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