diff --git a/README.md b/README.md index bb67500..f2b5877 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -## Adaptive mesh refinement in OpenFoam-v1812 for 2-dimensional problems +## The [original code](https://github.com/krajit/dynamicRefine2DFvMesh) is ported to OpenFOAM-v2306 with minimum modifications + +## Adaptive mesh refinement in OpenFOAM-v2306 for 2-dimensional problems Standard OpenFOAM-v1812 has a module called dynamicRefineFvMesh. This adaptive mesh refinement tool does not seem to be applicable for two dimensional problems. [Shonibare](https://www.academia.edu/16217705/Two-dimensional_adaptive_meshing_in_OpenFOAM) and [Ahmad Baniabedalruhman](https://digitalcommons.mtu.edu/cgi/viewcontent.cgi?referer=&httpsredir=1&article=2008&context=etds) diff --git a/src/Make/linux64GccDPInt32Debug/options b/src/Make/linux64GccDPInt32Debug/options deleted file mode 100644 index 60509bc..0000000 --- a/src/Make/linux64GccDPInt32Debug/options +++ /dev/null @@ -1,64 +0,0 @@ -# 1 "Make/options" -# 1 "" -# 1 "" -# 10 "" -# 1 "/usr/include/stdc-predef.h" 1 3 4 - -# 17 "/usr/include/stdc-predef.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 10 "" 2 -# 1 "Make/options" -EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/surfMesh/lnInclude -I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/mesh/extrudeModel/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicFvMesh/lnInclude - - - - - - - -LIB_LIBS = -lfiniteVolume -lsurfMesh -lextrudeModel -ldynamicMesh -ldynamicFvMesh diff --git a/src/Make/linux64GccDPInt32Debug/sourceFiles b/src/Make/linux64GccDPInt32Debug/sourceFiles deleted file mode 100644 index 2060dfe..0000000 --- a/src/Make/linux64GccDPInt32Debug/sourceFiles +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE = \ -hexRef2D.C \ -dynamicRefineFvMesh2D.C \ - -# sources diff --git a/src/Make/linux64GccDPInt32Debug/variables b/src/Make/linux64GccDPInt32Debug/variables deleted file mode 100644 index 8fadb31..0000000 --- a/src/Make/linux64GccDPInt32Debug/variables +++ /dev/null @@ -1 +0,0 @@ -LIB = $(FOAM_USER_LIBBIN)/libTest2dDynamicRefine diff --git a/src/Make/linux64GccDPInt32Opt/options b/src/Make/linux64GccDPInt32Opt/options deleted file mode 100644 index 60509bc..0000000 --- a/src/Make/linux64GccDPInt32Opt/options +++ /dev/null @@ -1,64 +0,0 @@ -# 1 "Make/options" -# 1 "" -# 1 "" -# 10 "" -# 1 "/usr/include/stdc-predef.h" 1 3 4 - -# 17 "/usr/include/stdc-predef.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 10 "" 2 -# 1 "Make/options" -EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/surfMesh/lnInclude -I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/mesh/extrudeModel/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicFvMesh/lnInclude - - - - - - - -LIB_LIBS = -lfiniteVolume -lsurfMesh -lextrudeModel -ldynamicMesh -ldynamicFvMesh diff --git a/src/Make/linux64GccDPInt32Opt/sourceFiles b/src/Make/linux64GccDPInt32Opt/sourceFiles deleted file mode 100644 index 42c43d6..0000000 --- a/src/Make/linux64GccDPInt32Opt/sourceFiles +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE = \ -hexRef2D/hexRef2D.C \ -dynamicRefine2DFvMesh/dynamicRefine2DFvMesh.C \ - -# sources diff --git a/src/Make/linux64GccDPInt32Opt/variables b/src/Make/linux64GccDPInt32Opt/variables deleted file mode 100644 index 53ff138..0000000 --- a/src/Make/linux64GccDPInt32Opt/variables +++ /dev/null @@ -1 +0,0 @@ -LIB = $(FOAM_USER_LIBBIN)/libdynamicRefine2D diff --git a/src/Make/options b/src/Make/options index f929b06..e6b8407 100644 --- a/src/Make/options +++ b/src/Make/options @@ -3,12 +3,12 @@ EXE_INC = \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/mesh/extrudeModel/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude LIB_LIBS = \ -lfiniteVolume \ -lsurfMesh \ -lextrudeModel \ - -ldynamicMesh \ - -ldynamicFvMesh + -ldynamicMesh \ + -ldynamicFvMesh diff --git a/src/dynamicRefine2DFvMesh/dynamicRefine2DFvMesh.C b/src/dynamicRefine2DFvMesh/dynamicRefine2DFvMesh.C index 691fde3..c3d586a 100644 --- a/src/dynamicRefine2DFvMesh/dynamicRefine2DFvMesh.C +++ b/src/dynamicRefine2DFvMesh/dynamicRefine2DFvMesh.C @@ -296,12 +296,12 @@ autoPtr dynamicRefine2DFvMesh::refine ( lookupObject(correctFluxes_[i][0]) ); - surfaceScalarField phiU = + surfaceScalarField phiU( fvc::interpolate ( lookupObject(correctFluxes_[i][1]) ) - & Sf(); + & Sf()); // Recalculate new internal faces. for (label faceI = 0; faceI < nInternalFaces(); faceI++) @@ -487,12 +487,12 @@ autoPtr dynamicRefine2DFvMesh::unrefine ( lookupObject(correctFluxes_[i][0]) ); - surfaceScalarField phiU = + surfaceScalarField phiU( fvc::interpolate ( lookupObject(correctFluxes_[i][1]) ) - & Sf(); + & Sf()); forAllConstIter(Map