CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[dRInterfaceLib] dynamicInterfaceRefineFvMesh libary tobias holzmann

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2017, 13:07
Default dynamicInterfaceRefineFvMesh libary tobias holzmann
  #1
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
https://www.cfd-online.com/Forums/op...o-regions.html

here our super moderator Tobias developed a fantastic extension for mesh refinement at the interface.
i am trying to compile for openfoam-v1612+
i got following error

Code:
wmake libso .
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file dynamicInterfaceRefineFvMesh.C
g++ -std=c++11 -m64 -DOPENFOAM_PLUS=1612 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -I/home/hasan/OpenFOAM/OpenFOAM-v1612+/src/triSurface/lnInclude -I/home/hasan/OpenFOAM/OpenFOAM-v1612+/src/meshTools/lnInclude -I/home/hasan/OpenFOAM/OpenFOAM-v1612+/src/dynamicMesh/lnInclude -I/home/hasan/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude -I/home/hasan/OpenFOAM/OpenFOAM-v1612+/src/dynamicFvMesh/lnInclude -IlnInclude -I. -I/home/hasan/OpenFOAM/OpenFOAM-v1612+/src/OpenFOAM/lnInclude -I/home/hasan/OpenFOAM/OpenFOAM-v1612+/src/OSspecific/POSIX/lnInclude   -fPIC -c dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C -o Make/linux64GccDPInt32Opt/dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.o
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C: In member function ‘Foam::autoPtr<Foam::mapPolyMesh> Foam::dynamicInterfaceRefineFvMesh::refine(const labelList&)’:
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C:349:17: error: ‘fillSignallingNan’ is not a member of ‘Foam::sigFpe’
                 sigFpe::fillSignallingNan(phi.internalField());
                 ^
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C:389:13: error: ‘GeometricBoundaryField’ is not a member of ‘Foam::surfaceScalarField {aka Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>}’
             surfaceScalarField::GeometricBoundaryField& bphi =
             ^
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C:389:57: error: ‘bphi’ was not declared in this scope
             surfaceScalarField::GeometricBoundaryField& bphi =
                                                         ^
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C: In member function ‘Foam::autoPtr<Foam::mapPolyMesh> Foam::dynamicInterfaceRefineFvMesh::unrefine(const labelList&)’:
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C:579:13: error: ‘GeometricBoundaryField’ is not a member of ‘Foam::surfaceScalarField {aka Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>}’
             surfaceScalarField::GeometricBoundaryField& bphi =
             ^
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C:579:57: error: ‘bphi’ was not declared in this scope
             surfaceScalarField::GeometricBoundaryField& bphi =
                                                         ^
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C: In member function ‘virtual bool Foam::dynamicInterfaceRefineFvMesh::writeObject(Foam::IOstream::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const’:
dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.C:1662:9: error: ‘writeObjects’ is not a member of ‘Foam::dynamicFvMesh’
         dynamicFvMesh::writeObjects(fmt, ver, cmp)
         ^
/home/hasan/OpenFOAM/OpenFOAM-v1612+/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.o' failed
make: *** [Make/linux64GccDPInt32Opt/dynamicInterfaceRefineFvMesh/dynamicInterfaceRefineFvMesh.o] Error 1
hasan@hasan-Lenovo-G50-70:~/OpenFOAM/hasan-v1612+/OpenFOAM_extensions/dynamicinterfacerefinefvmesh/src/dynamicFvMesh$
i need help guys. i have to do this. i need interface refinement. i tried to look into the code but still errors are not going away.
please take a look

Last edited by Tobi; August 22, 2017 at 10:58.
saddy is offline   Reply With Quote

Old   August 22, 2017, 11:01
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Saddy,

first of all thanks for the first sentence
To your question. Unfortunately the library is based on OpenFOAM-2.3.x and I should update it to 5.0 (maybe today in the evening). However, if you just need an interface refinement, you can use the standard library. Just set the refinement between e.g. alpha 0.4 and 0.6. In addition to your question, the field names changes during different releases and even more if different openfoam versions are used. Mine is based on the Foundation one but you are using the one from ESI. I am not sure if it is compatible. You can try to compile the library if I updated it to version 5.x but I don't think that it will work out of the box. But again, an interface refinement can be done with the normal library too.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 22, 2017, 15:30
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Done,

I got the same errors in the 5.x version. So now you can use the library for the Foundation Version and I guess also for the ESI one (because I had the same errors).

Cheers.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 23, 2017, 05:30
Default
  #4
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Done,

I got the same errors in the 5.x version. So now you can use the library for the Foundation Version and I guess also for the ESI one (because I had the same errors).

Cheers.
First of all, i said it because your work is really fantastic. kind of gerris code octree which is amazing
i have also found that openfoam lacks in refinement department. if there was anisotropic/unstructured/tetrahedral refinement available. openfoam would be very robust.
thanks so much for updating the code. it means a lot.
actually my problem is based on refining the mesh inside a cylinder and i have tried with normal library, trust me. but it doesn't work half as good as yours. i installed your extension in OF2.3.1 and the RESULTS WERE COMPARABLE TO GERRIS OCTREE.
i ran the dam break problem and i used refinement level 8 with just a single mesh consisting of two blocks only.
your library i feel makes it faster too.
i'll try installing for my openfoam-v1612+ and let you know if it works
saddy is offline   Reply With Quote

Old   August 23, 2017, 08:37
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Just out of curiosity - what do you mean with Gerris Code Octree.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 24, 2017, 05:54
Default
  #6
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
i am sure you aware of gerris flow solver. actually gerris uses octree meshing. the simulation starts with a single block and refinement takes place only where the interface is. the adaptive meshing of gerris is by far the best. your code follows the same refinement followed by gerris
there is no need for giving a base mesh like in openfoam. simple geometries can be given by means of equation: cylinder by x2+y2=r2 and extruding in z..simple
a good visulaization of gerris octree meshing is here;
https://www.youtube.com/watch?v=yJhYENolQeU
https://www.youtube.com/watch?v=3Jf_-XMv1wk

the discussion on it's tree strucure/adaptivity is given here.
in short gerris:solves for each finer subgrid to capture flow physics,to reach kolmogrov length scales
https://www.youtube.com/watch?v=DKn9iuD7Ihk

i believe openfoam lags in this department.
GERRIS adaptivemeshing comes so close to DNS!.
saddy is offline   Reply With Quote

Old   August 24, 2017, 06:30
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I am sorry but I never heard about Gerris. Seems that it is not longer in development. Thanks for the information but I will not check it out. If you are so happy with that software, use it.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 24, 2017, 07:35
Default
  #8
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11
alinuman15 is on a distinguished road
That is really beneficial discussion. However, I would like to add that Gerris is not that effective for handling the contact angle phenomena particularly for 3D problems. That why I switched towards OpenFoam after working with gerris for a while.
Now, I have solved very complicated cases of interface tracking. However, I never used the adaptive mesh refinement. Any idea about links, examples , ... etc preferably if there is something works with Salome?
Thank you all


Sent from my iPhone using CFD Online Forum mobile app
alinuman15 is offline   Reply With Quote

Old   August 24, 2017, 09:05
Default
  #9
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
FYI: Gerris has long been superseeded by PARIS: http://www.ida.upmc.fr/~zaleski/paris/index.html
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   August 24, 2017, 09:09
Default
  #10
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11
alinuman15 is on a distinguished road
That is true ( I am following Gerris news!) but not for tracking the contact line in its 3d fashion.
Regards
alinuman15 is offline   Reply With Quote

Old   August 24, 2017, 11:27
Default
  #11
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
Yes , Gerris is no longer in development.
it's been followed with basilisk which is still in process of testing and development,
paris is also a good.

but openFoam needs unstructured adaptive refinement. because adaptive meshing saves time when it comes to simulating big & complex geometric dimensions.
it's not possible to figure out snappyhexmesh problems and keep trying until you get it right.
and unless you have hexahedral mesh openfoam doesn't refine.it's just not possible to make hexahedral mesh for some geometries at all
take a look at these posts,

Adaptive mesh and movement
saddy is offline   Reply With Quote

Old   August 24, 2017, 11:41
Default
  #12
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11
alinuman15 is on a distinguished road
Thanks Saddy. I will look at take a look at that post.


Sent from my iPhone using CFD Online Forum mobile app
alinuman15 is offline   Reply With Quote

Old   August 24, 2017, 15:04
Default
  #13
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
Quote:
Originally Posted by Tobi View Post
I am sorry but I never heard about Gerris. Seems that it is not longer in development. Thanks for the information but I will not check it out. If you are so happy with that software, use it.
i did use gerris earlier, but i switched to openfoam because there is no phase change in gerris. i am working on phase change.
and yeah i installed your OpenFOAM5.0 it compiled after 1 error: line1662 i changed writeobjects to writeobject. unfortunately it compiles but doesn't work on the way it should.
i'll try to sit down with the codes and try to compile it again.!!!
thanks
saddy is offline   Reply With Quote

Old   August 26, 2017, 03:54
Default
  #14
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
PROFESSOR Zaleski ia coming to our college in september to give guest lectures
saddy is offline   Reply With Quote

Reply

Tags
interface refinement, refinefvmesh


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
question about CFD-DTF libary jackson Main CFD Forum 0 September 12, 2009 01:06


All times are GMT -4. The time now is 23:43.