Creating a 2D AMR copying from dynamicRefineFvMesh
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: 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. |
The parts of the files which I expect to be relevant (although clearly I'm wrong) now read:
dynamicRefineFvMeshHexRef4.C Code:
namespace Foam Code:
|
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 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 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 |
Seems I can create an additional library using wmake libso and then link to that in my dynamicMeshDict file. Working on that now.
|
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. |
Hi Christian,
Were you successful in creating a 2-D version of dynamicRefineFvMesh? Philip |
All times are GMT -4. The time now is 10:31. |