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

Dual Grid Solver and chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By kk415

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2019, 01:11
Unhappy Dual Grid Solver and chtMultiRegionFoam
  #1
Senior Member
 
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10
kk415 is on a distinguished road
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?
kk415 is offline   Reply With Quote

Old   January 20, 2019, 02:45
Default
  #2
Senior Member
 
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10
kk415 is on a distinguished road
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.
atulkjoy likes this.
kk415 is offline   Reply With Quote

Reply


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


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


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