|
[Sponsors] |
Creating a 2D AMR copying from dynamicRefineFvMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 5, 2014, 02:05 |
Creating a 2D AMR copying from dynamicRefineFvMesh
|
#1 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
So, like several other people in this forum, I'm looking at how to try and implement at 2D adaptive mesh refinement.
I'm using the document at http://publications.lib.chalmers.se/...173/174173.pdf for direction, and am currently in the first instance attempting to copy and replace the names of my dynamicRefineFvMesh.{C,H} files. I have so far made no changes to what the files actually do - I'm only seeking to use wmake and get myInterDyMFoam to use the dynamicRefineFvMeshHexRef4.{C,H} (which still depend on HexRef8) to compile and run. When I try and run the solver on the tutorial damBreakWithObstacle case from the interDyMFoam directory, I get Code:
--> FOAM FATAL ERROR: Unknown dynamicFvMesh type dynamicRefineFvMeshHexRef4 Valid dynamicFvMesh types are : 8 ( dynamicInkJetFvMesh dynamicMotionSolverFvMesh dynamicRefineFvMesh movingConeTopoFvMesh multiSolidBodyMotionFvMesh rawTopoChangerFvMesh solidBodyMotionFvMesh staticFvMesh ) From function dynamicFvMesh::New(const IOobject&) in file dynamicFvMesh/dynamicFvMeshNew.C at line 81. FOAM exiting Code:
dynamicFvMeshLibs dynamicRefineFvMeshHexRef4; My first question is, are these meshes defined in libdynamicFvMesh.so, or some similar libXYZ.so, and if so, can I do anything about this? If they are defined somewhere else, could someone please point me in their direction? It is my current assumption that they are held in a lib.so file, and that I will need to define the mesh type in some way inside my dynamicMeshDict file (or perhaps create copies of many more files to my solver, and make (hopefully minor?) modifications) so as to allow it to read a new mesh type. Please let me know what I should be trying to do. |
|
February 5, 2014, 02:17 |
|
#2 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
The parts of the files which I expect to be relevant (although clearly I'm wrong) now read:
dynamicRefineFvMeshHexRef4.C Code:
namespace Foam { defineTypeNameAndDebug(dynamicRefineFvMeshHexRef4, 0); addToRunTimeSelectionTable(dynamicFvMesh, dynamicRefineFvMeshHexRef4, IOobject); } Code:
class dynamicRefineFvMeshHexRef4 : public dynamicFvMesh { protected: //- Mesh cutting engine hexRef8 meshCutter_; ... public: //- Runtime type information TypeName("dynamicRefineFvMeshHexRef4"); // Constructors //- Construct from IOobject explicit dynamicRefineFvMeshHexRef4(const IOobject& io); //- Destructor virtual ~dynamicRefineFvMeshHexRef4(); // Member Functions //- Direct access to the refinement engine const hexRef8& meshCutter() const { return meshCutter_; } ... |
|
February 5, 2014, 03:00 |
|
#3 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
On a side note, and possibly (probably?) related to this - my solver, and the interDyMFoam default solver, have no dependence on the file dynamicFvMeshNew.C, even though it looks quite a lot like the function contained within is called - createDynamicFvMesh.H (which is #included in interDyMFoam.C) calls
Code:
autoPtr<dynamicFvMesh> meshPtr ( dynamicFvMesh::New ( IOobject ( dynamicFvMesh::defaultRegion, runTime.timeName(), runTime, IOobject::MUST_READ ) ) ); dynamicFvMeshNew.C opens with some includes, including to a "dlLibraryTable.H", which has an #ifdef NoRepository #include ...TemplateTable, which would seem to be required for the number of arguments being passed later in dynamicFvMeshNew.C Code:
const_cast<Time&>(io.time()).libs().open ( dict, "dynamicFvMeshLibs", IOobjectConstructorTablePtr_ ); Back to the point, dynamicFvMeshNew.C then goes on to iterate through a list of libraries (or something?) returned by the libs().open call in the code above, and when it reaches the end without finding dynamicRefineFvMeshHexRef4, it outputs the error in the initial post (Valid dynamicFvMesh types are : ... " Any thoughts much appreciated |
|
February 5, 2014, 04:08 |
|
#4 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
Seems I can create an additional library using wmake libso and then link to that in my dynamicMeshDict file. Working on that now.
|
|
February 5, 2014, 04:46 |
|
#5 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
Had to move a few things around and change some variables in Make/{files,options} but got wmake libso to work. Linking the library to the solver allowed me to remove the line from controlDict, and allows the case to 'work', so now I can work on changing the library and/or solver.
Apologies for 5 posts of my talking to myself, but seems I can't delete the thread, and maybe others are as stupid as I am and will find this useful. |
|
December 30, 2014, 13:03 |
|
#6 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Hi Christian,
Were you successful in creating a 2-D version of dynamicRefineFvMesh? Philip |
|
Tags |
amr, dynamicmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Fluent3DMeshToFoam | simvun | OpenFOAM Meshing & Mesh Conversion | 50 | January 19, 2020 16:33 |
[blockMesh] Problems in creating a wedge type mesh | Joscha | OpenFOAM Meshing & Mesh Conversion | 28 | August 3, 2019 08:59 |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 10:28 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 18:51 |
Problems with Meshing: Collapsed Cells | Emmanuel Resch | Siemens | 1 | July 30, 2007 04:02 |