|
[Sponsors] |
January 20, 2019, 01:11 |
Dual Grid Solver and chtMultiRegionFoam
|
#1 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
Hello Foamers,
I am working on a project in which I need to develop a multiphase solver using the concept of dual grid (i.e. using two grid simultaneously, one for flow solver and another for volume fraction scalar. The key idea is to use fine mesh for volume fraction scalar). So I develop the solver in a similar manner to chtMultiRegion solver in which two regions are overlapping each other. The solver works for serial run but for parallel case it is causing problem. I have the following question to ask: 1. How can I ensure that after decomposition each processor takes the same set of cells in both regions? 2. Is there any way to create a refine mesh from the parent mesh using splitcells or something, inside a solver? |
|
January 20, 2019, 02:45 |
|
#2 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
Working on splitting of mesh I found this document very helpful.
http://www.tfd.chalmers.se/~hani/kur...erceReport.pdf Now I am working in similar manner, and splitting the cells the following manner. #include "createMesh.H" #include "createNewMesh.H" //Create object newMesh const cellList& cells = mesh.cells(); //List to loop through labelList refCells; //List of cells to refine refCells.clear(); //Clear the list refCells.resize(mesh.cells().size()); forAll(cells,cellI) { refCells[cellI]=cellI; } Info << "Entering Refinement" << endl; //******** Cell Refinement ********** // Since this is a pretty long function i would in this section // like to call upon a function file that refines the mesh. // That file should be similar to refineMesh.C // Define refinement dictionary dictionary refineDict; //Declare dictionary coeffsDict; coeffsDict.add("tan1", vector(1, 0, 0)); coeffsDict.add("tan2", vector(0, 1, 0)); wordList directions(2); directions[0] = "tan1"; directions[1] = "tan2"; refineDict.add("directions", directions); // Add directions to the dictionary refineDict.add("useHexTopology", "false");// Use standard cutter refineDict.add("coordinateSystem", "global"); refineDict.add("globalCoeffs", coeffsDict); refineDict.add("geometricCut", "false"); refineDict.add("writeMesh", "false"); // Multi-directional refinement (does multiple iterations) Info << "Entering Refinement" << endl; multiDirRefinement multiRef(newMesh, refCells, refineDict); Info << "Done with Refinement" << endl; Info << "Writing new mesh with " << refCells.size() << " refinements" << endl; //mesh.write(); newMesh.write(); Info << newMesh.cells().size() << endl; The problem is my parent mesh is also getting refined, when I want only newMesh to be refined. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing Frozenflowfield in chtMultiRegionFoam Solver during simulation | meshingpumpkins | OpenFOAM Programming & Development | 4 | February 18, 2019 18:43 |
Substitute fluid solver in chtMultiRegionFoam | michael157 | OpenFOAM Programming & Development | 3 | January 25, 2018 18:34 |
Chtmultiregionfoam with boussinesq assumption solver developed...needs suggestions an | manuc | OpenFOAM Programming & Development | 8 | December 30, 2016 02:08 |
Using a Different Thermodynamics Package with the chtMultiRegionFoam Solver | m.nichols19 | OpenFOAM | 7 | March 17, 2011 16:26 |
Creating a new solver from chtMultiRegionFoam | David_010 | OpenFOAM Programming & Development | 0 | April 20, 2010 11:36 |