|
[Sponsors] |
[mesh manipulation] mergeMeshes for more than two fluid domains |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 6, 2019, 01:20 |
mergeMeshes for more than two fluid domains
|
#1 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi all,
I am new to Openfoam. Actually I have 5 fluid domains. I exported the mesh for fluid domains individually from ansys mesh and i need to create the interface in between the fluid domains. My question is, In openfoam, how to write a masterCase and slaveCase for 5 fluid domains in mergeMeshes command ? To merge two fluid domains into 1, we can use mergeMeshes masterCase slaveCase and how to write for merging of 5 fluid domains into 1 ? Thankyou in advance. |
|
May 8, 2019, 02:03 |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
I don't think there is a way to merge all 5 together. You have to go sequentially if I am not mistaken. You merge meshes 1 & 2 (let us say the merged is called mesh12). Then you merged mesh12 with mesh3 to get mesh123. You merge mesh123 with mesh4 to get mesh1234. And finally you merge mesh1234 with mesh5 to get the complete merged mesh12345. Hope this helps. Cheers, Antimony |
|
May 8, 2019, 02:40 |
|
#3 | |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Quote:
Thanks for your quick response. It's working perfectly. But interfaces are not created, and every interior faces in the boundary are taken as wall as mentioned below. Code:
15 ( massflow-inlet { type patch; nFaces 715; startFace 12137752; } wall-inlet-pipe { type wall; inGroups 1(wall); nFaces 4928; startFace 12138467; } int-pipe-tube-in-1 { type wall; inGroups 1(wall); nFaces 715; startFace 12143395; } wall-inlet-tank { type wall; inGroups 1(wall); nFaces 88392; startFace 12144110; } int-pipe-tube-in-2 { type wall; inGroups 1(wall); nFaces 715; startFace 12232502; } int-core-in-1 { type wall; inGroups 1(wall); nFaces 11340; startFace 12233217; } wall-core { type wall; inGroups 1(wall); nFaces 1224000; startFace 12244557; } int-core-in-2 { type wall; inGroups 1(wall); nFaces 11340; startFace 13468557; } int-core-out-1 { type wall; inGroups 1(wall); nFaces 11340; startFace 13479897; } wall-outlet-tank { type wall; inGroups 1(wall); nFaces 88720; startFace 13491237; } int-core-out-2 { type wall; inGroups 1(wall); nFaces 11340; startFace 13579957; } int-pipe-tube-out-1 { type wall; inGroups 1(wall); nFaces 674; startFace 13591297; } pressure-outlet { type patch; nFaces 674; startFace 13591971; } wall-outlet-pipe { type wall; inGroups 1(wall); nFaces 4928; startFace 13592645; } int-pipe-tube-out-2 { type wall; inGroups 1(wall); nFaces 674; startFace 13597573; } ) Vishsel Last edited by wyldckat; May 11, 2019 at 10:22. Reason: [QUOTE]->[CODE] |
||
May 8, 2019, 02:57 |
|
#4 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
mergeMeshes does not create interfaces. That is something that has to be done by the user. I usually use cyclicAMI to connect two meshes that have been merged. And I do this after I have merged all meshes. You could look around and see what other patchTypes people use for interface. One other point to note - if I am not wrong, patches with the same name will be merged into one when you use mergeMeshes. So you might want to keep that in mind to ensure that mergeMeshes is not doing something you don't want it to do. Hope this helps. Cheers, Antimony |
|
May 8, 2019, 03:08 |
|
#5 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Thankyou so much for your response and feedback.
Best regards, Vishsel |
|
May 8, 2019, 09:25 |
|
#6 | |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Quote:
I have done mergeMeshes with same internal patch names and it was merged. Now my question is, how to define a boundary condition for internal patch in U,p,k,T,nut,epsilon dictionary at 0 directory ? Thanks in advance. Last edited by Vishsel; May 9, 2019 at 01:47. |
||
May 9, 2019, 01:52 |
|
#7 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Code:
11 ( massflow-inlet { type patch; nFaces 715; startFace 12137752; } wall-inlet-pipe { type wall; inGroups 1 ( wall ); nFaces 4928; startFace 12138467; } int-pipe-tube-in { type patch; nFaces 1430; startFace 12143395; } int-core-in { type patch; nFaces 22680; startFace 12144825; } wall-inlet-tank { type wall; inGroups 1 ( wall ); nFaces 88392; startFace 12167505; } int-core-out { type patch; nFaces 22680; startFace 12255897; } wall-core { type wall; inGroups 1 ( wall ); nFaces 1224000; startFace 12278577; } int-pipe-tube-out { type patch; nFaces 1348; startFace 13502577; } wall-outlet-tank { type wall; inGroups 1 ( wall ); nFaces 88720; startFace 13503925; } pressure-outlet { type patch; nFaces 674; startFace 13592645; } wall-outlet-pipe { type wall; inGroups 1 ( wall ); nFaces 4928; startFace 13593319; } ) This is my boundary file. i have to create boundary condition for internal patches such as int-pipe-tube-in & out int-core-in & out anyone can help me ? Thankyou in advance. Vishsel Last edited by wyldckat; May 11, 2019 at 10:21. Reason: [QUOTE]->[CODE] |
|
May 9, 2019, 02:23 |
|
#8 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
The patches indicated in the boundary file are technically boundary patches, meaning that you would need to specify BCs on them in the 0 folder for you to start the simulation. In light of this, I am not sure what exactly you mean... Cheers, Antimony |
|
May 9, 2019, 02:31 |
|
#9 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi Antimony,
That's correct. I am asking how to write a boundary condition for internal patch in U,p,k,T,nut,epsilon dictionary at 0 directory ? like below quotes Thanks in advance. Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { massflow-inlet { type flowRateInletVelocity; massFlowRate constant value; value uniform (0 0 0); rho rho; rhoInlet value; } pressure-outlet { type zeroGradient; } wall-inlet-tank { type fixedValue; value uniform (0 0 0); } wall-outlet-tank { type fixedValue; value uniform (0 0 0); } wall-core { type fixedValue; value uniform (0 0 0); } wall-inlet-pipe { type fixedValue; value uniform (0 0 0); } wall-outlet-pipe { type fixedValue; value uniform (0 0 0); } } Last edited by wyldckat; May 11, 2019 at 10:21. Reason: [QUOTE]->[CODE] |
|
May 10, 2019, 02:48 |
|
#10 | |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi Bruno,
Quote:
5 fluid domains = inlet pipe,inlet tank, core,outlet tank,outlet pipe. Between these domains there are internal patches (totally 4 patches). In that patches, I have to monitor the pressure value. And is it possible to use inletOutlet boundary condition for internal patches? So How to set a boundary conditions for internal patches in U,p,k,T,nut,epsilon dictionary at 0 time folder ? |
||
May 11, 2019, 10:33 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer: If you study the tutorial case "incompressible/pimpleFoam/RAS/propeller", you should be able to figure out how to make this work in your case: https://github.com/OpenFOAM/OpenFOAM.../RAS/propeller
Steps:
__________________
|
|
May 13, 2019, 02:17 |
|
#12 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi Bruno,
Thank you so much for your help. I followed what you have said and the patches were created. This is my createPatchDict file Code:
// Do a synchronisation of coupled points after creation of any patches. // Note: this does not work with points that are on multiple coupled patches // with transformations (i.e. cyclics). pointSync false; // Patches to create. patches ( { //- Master side patch name pipeTubeIn; patchInfo { type cyclicAMI; matchTolerance 0.0001; neighbourPatch pipeTubeOut; transform translational; separationVector (0 0.64 0) } constructFrom patches; patches (int-pipe-tube-in); } { //- Slave side patch name pipeTubeOut; patchInfo { type cyclicAMI; matchTolerance 0.0001; neighbourPatch pipeTubeIn; transform translational; separationVector (0 -0.64 0) } constructFrom patches; patches (int-pipe-tube-out); } { //- Slave side patch name coreIn; patchInfo { type cyclicAMI; matchTolerance 0.0001; neighbourPatch coreOut; transform translational; separationVector (0 0.5 0) } constructFrom patches; patches (int-core-in); } { //- Slave side patch name coreOut; patchInfo { type cyclicAMI; matchTolerance 0.0001; neighbourPatch coreIn; transform translational; separationVector (0 -0.5 0) } constructFrom patches; patches (int-core-out); } ); // ************************************************************************* // Code:
Create time Create mesh for time = 0 SIMPLE: no convergence criteria found. Calculations will run for 100 steps. Reading field p Reading field U Reading/calculating face flux field phi AMI: Creating addressing and weights between 1430 source faces and 1348 target faces AMI: Patch source sum(weights) min/max/average = 0, 1, 0.621329 AMI: Patch target sum(weights) min/max/average = 0, 1, 0.604025 AMI: Creating addressing and weights between 22680 source faces and 22680 target faces AMI: Patch source sum(weights) min/max/average = 0, 1, 0.749074 AMI: Patch target sum(weights) min/max/average = 0, 1, 0.749074 Selecting incompressible transport model Newtonian Selecting RAS turbulence model realizableKE bounding k, min: 0 max: 1 average: 1 [4] We're sorry, but the application crashed and safe stack tracing isn't available in this current implementation of blueCFD-Core patches for OpenFOAM. job aborted: [ranks] message [0-3] terminated [4] process exited without calling finalize [5] terminated ---- error analysis ----- [4] on PC porousSimpleFoam ended prematurely and may have crashed. exit code 3 ---- error analysis ----- Thankyou in advance Vishsel Last edited by Vishsel; May 13, 2019 at 09:03. |
|
May 13, 2019, 19:04 |
|
#13 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answers/questions:
|
|
May 14, 2019, 03:29 |
|
#14 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi Bruno,
Thanks again. The steps are perfectly works and I got the value of transform. But actually the Interiors pipeTubeIn and pipeTubeOut translates along x direction (0.144999995827675 0 0) and distance between the coreIn & coreOut interiors are 0.5 meters along y direction, so i have given it as (0 0.5 0). Q1.)Is it correct? Q2.)I don't know which transform i have to use for my case, whether noOrdering or translational ? But i am getting same error while using noOrdering or translational as like below attached code. And I have shared a case dictionary through private message. I got this error, after running the command decomposePar Code:
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Decomposing mesh region0 Create mesh Calculating distribution of cells Selecting decompositionMethod scotch Finished decomposition in 12.87 s Calculating original mesh data Distributing cells to processors Distributing faces to processors Distributing points to processors Constructing processor meshes Processor 0 Number of cells = 824190 Number of faces shared with processor 1 = 535 Number of faces shared with processor 3 = 400 Number of processor patches = 2 Number of processor faces = 935 Number of boundary faces = 341411 Processor 1 Number of cells = 825225 Number of faces shared with processor 0 = 535 Number of faces shared with processor 2 = 690 Number of processor patches = 2 Number of processor faces = 1225 Number of boundary faces = 362705 Processor 2 Number of cells = 825240 Number of faces shared with processor 1 = 690 Number of processor patches = 1 Number of processor faces = 690 Number of boundary faces = 362686 Processor 3 Number of cells = 819554 Number of faces shared with processor 0 = 400 Number of faces shared with processor 5 = 2030 Number of processor patches = 2 Number of processor faces = 2430 Number of boundary faces = 226670 Processor 4 Number of cells = 830681 Number of faces shared with processor 5 = 1163 Number of processor patches = 1 Number of processor faces = 1163 Number of boundary faces = 83335 Processor 5 Number of cells = 824966 Number of faces shared with processor 3 = 2030 Number of faces shared with processor 4 = 1163 Number of processor patches = 2 Number of processor faces = 3193 Number of boundary faces = 83688 Number of processor faces = 4818 Max number of cells = 830681 (0.691535% above average 824976) Max number of processor patches = 2 (20% above average 1.66667) Max number of faces between processors = 3193 (98.8169% above average 1606) Time = 0 AMI: Creating addressing and weights between 1430 source faces and 1348 target faces --> FOAM Warning : From function AMIMethod<SourcePatch, TargetPatch>::checkPatches() in file lnInclude/../AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C at line 57 Source and target patch bounding boxes are not similar source box span : (1.00198e-014 0.06985 0.06985) target box span : (2.6007e-014 0.06985 0.06985) source box : (0.145 -0.104925 -0.034925) (0.145 -0.035075 0.034925) target box : (0.145 0.535075 -0.034925) (0.145 0.604925 0.034925) inflated target box : (0.140061 0.530136 -0.0398641) (0.149939 0.609864 0.0398641) --> FOAM FATAL ERROR: Unable to find initial target face From function void Foam::AMIMethod<SourcePatch, TargetPatch>::initialise(label&, label&) in file lnInclude/../AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C at line 139. FOAM aborting We're sorry, but the application crashed and safe stack tracing isn't available in this current implementation of blueCFD-Core patches for OpenFOAM. This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Q3.)while running checkMesh, I came to know this. Is this is the problem ? if this is a problem please help me for further process. I have used mergeMeshes for merging. Code:
*Number of regions: 40 The mesh has multiple regions which are not connected by any face. Code:
Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 3991103 faces: 13598247 internal faces: 12137752 cells: 4949856 faces per cell: 5.19934 boundary patches: 11 point zones: 0 face zones: 5 cell zones: 5 Overall number of cells of each type: hexahedra: 2955296 prisms: 1936 wedges: 0 pyramids: 24047 tet wedges: 0 tetrahedra: 1968577 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. *Number of regions: 40 The mesh has multiple regions which are not connected by any face. <<Writing region information to "0/cellToRegion" <<Writing region 0 with 62920 cells to cellSet region0 <<Writing region 1 with 996230 cells to cellSet region1 <<Writing region 2 with 78750 cells to cellSet region2 <<Writing region 3 with 78750 cells to cellSet region3 <<Writing region 4 with 78750 cells to cellSet region4 <<Writing region 5 with 78750 cells to cellSet region5 <<Writing region 6 with 78750 cells to cellSet region6 <<Writing region 7 with 78750 cells to cellSet region7 <<Writing region 8 with 78750 cells to cellSet region8 <<Writing region 9 with 78750 cells to cellSet region9 <<Writing region 10 with 78750 cells to cellSet region10 <<Writing region 11 with 78750 cells to cellSet region11 <<Writing region 12 with 78750 cells to cellSet region12 <<Writing region 13 with 78750 cells to cellSet region13 <<Writing region 14 with 78750 cells to cellSet region14 <<Writing region 15 with 78750 cells to cellSet region15 <<Writing region 16 with 78750 cells to cellSet region16 <<Writing region 17 with 78750 cells to cellSet region17 <<Writing region 18 with 78750 cells to cellSet region18 <<Writing region 19 with 78750 cells to cellSet region19 <<Writing region 20 with 78750 cells to cellSet region20 <<Writing region 21 with 78750 cells to cellSet region21 <<Writing region 22 with 78750 cells to cellSet region22 <<Writing region 23 with 78750 cells to cellSet region23 <<Writing region 24 with 78750 cells to cellSet region24 <<Writing region 25 with 78750 cells to cellSet region25 <<Writing region 26 with 78750 cells to cellSet region26 <<Writing region 27 with 78750 cells to cellSet region27 <<Writing region 28 with 78750 cells to cellSet region28 <<Writing region 29 with 78750 cells to cellSet region29 <<Writing region 30 with 78750 cells to cellSet region30 <<Writing region 31 with 78750 cells to cellSet region31 <<Writing region 32 with 78750 cells to cellSet region32 <<Writing region 33 with 78750 cells to cellSet region33 <<Writing region 34 with 78750 cells to cellSet region34 <<Writing region 35 with 78750 cells to cellSet region35 <<Writing region 36 with 78750 cells to cellSet region36 <<Writing region 37 with 78750 cells to cellSet region37 <<Writing region 38 with 996394 cells to cellSet region38 <<Writing region 39 with 59312 cells to cellSet region39 Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology massflow-inlet 715 737 ok (non-closed singly connected) wall-inlet-pipe 4928 4984 ok (non-closed singly connected) pipeTubeIn 1430 1474 ok (non-closed singly connected) coreIn 22680 27648 ok (non-closed singly connected) wall-inlet-tank 88392 46637 ok (non-closed singly connected) coreOut 22680 27648 ok (non-closed singly connected) wall-core 1224000 1228896 ok (non-closed singly connected) pipeTubeOut 1348 1398 ok (non-closed singly connected) wall-outlet-tank 88720 46801 ok (non-closed singly connected) pressure-outlet 674 699 ok (non-closed singly connected) wall-outlet-pipe 4928 4984 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-0.0639 -0.104925 -0.237063) (0.49425 0.604925 0.237063) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (-2.42398e-016 -2.16456e-015 8.95593e-014) OK. Max cell openness = 3.72756e-016 OK. Max aspect ratio = 11.0462 OK. Minimum face area = 4.53883e-009. Maximum face area = 3.19248e-005. Face area magnitudes OK. Min volume = 1.21833e-013. Max volume = 5.95433e-008. Total volume = 0.0142551. Cell volumes OK. Mesh non-orthogonality Max: 73.5639 average: 10.0841 *Number of severely non-orthogonal (> 70 degrees) faces: 1. Non-orthogonality check OK. <<Writing 1 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. Max skewness = 1.10583 OK. Coupled point location match (average 0) OK. Mesh OK. End Vishsel Last edited by Vishsel; May 14, 2019 at 09:59. |
|
May 14, 2019, 18:02 |
|
#15 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Q1) According to the decomposePar, the translation seems to be wrong... namely that it should be the original value you had of "(0 +-0.64 0)" for pipeTubeIn and pipeTubeOut ... and not "(0.14 0 0)"... Q2) Something weird is going on... the "boundary" file you sent me via PM does not mention the transformation... maybe cyclicAMI does not support transformation? I don't remember ever trying it myself... edit: It might do the transformation on its own... hence not having a value assigned to it... And something looks very strange in the output from decomposePar: Code:
source box span : (1.00198e-014 0.06985 0.06985) target box span : (2.6007e-014 0.06985 0.06985) source box : (0.145 -0.104925 -0.034925) (0.145 -0.035075 0.034925) target box : (0.145 0.535075 -0.034925) (0.145 0.604925 0.034925) inflated target box : (0.140061 0.530136 -0.0398641) (0.149939 0.609864 0.0398641) Which reminds me: in the file "system/controlDict", use the "writeFormat" set to "binary" and not "ascii". You must use this for all mesh operations, including the mergers. Q3) Uh... 40 regions instead of just 5? I would need to see the exact commands and steps you used to merge the meshes... because this looks like you kept merging meshes several times, instead of just 5?
__________________
Last edited by wyldckat; May 14, 2019 at 18:02. Reason: see "edit:" |
|
May 15, 2019, 01:48 |
|
#16 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi Bruno,
For merging i have used mergeMeshes file1 file2 - both files are folders with 0,constant,system directories & .msh file and i have five domains so i have created 5 file folders with directories & each .msh file for each file folder. (totally five .msh file) so i have used mergeMeshes command by mergeMeshes file1 file2 - new 1 time folder are created in file1 folder and i have copied the polymesh file from 1 time folder to constant/polymesh in file1 folder & for each merging like 12 13 14 15 and for each and every mergeMeshes i will copy the polymesh in 1 time folder and paste it in constant/polymesh . and finally i have viewed in paraFoam for conforming the merging of 5 fluid domains and it was merged. Before merging, i ran fluent3DMeshToFoam abc.msh individually by setting current directory of each file folder for conversion. For merging the fluid domains, i just given a same name for interiors because patches with the same name will be merged into one when we use mergeMeshes. And patches also created as files i have sent to you. while exporting from ansys mesh i set it as "ASCII" format and in controlDict file it has "Binary" format. Thanks in advance Vishsel. Last edited by Vishsel; May 16, 2019 at 02:50. |
|
May 18, 2019, 14:30 |
|
#17 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answers:
|
|
May 20, 2019, 08:05 |
|
#18 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi Bruno,
Thanks for your support. Regards, Vishsel Last edited by Vishsel; May 27, 2019 at 00:59. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
Dividing fluid domain into separate domains | Mina G. Mourad | FLUENT | 0 | July 9, 2017 17:15 |
Difficulty in calculating angular velocity of Savonius turbine simulation | alfaruk | CFX | 14 | March 17, 2017 07:08 |
conjugate heat transfer in OpenFOAM | skuznet | OpenFOAM Running, Solving & CFD | 99 | March 16, 2017 06:07 |
Fluid domain and sub domains in ansys | nitish_a | ANSYS | 1 | October 5, 2015 13:02 |