CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Customize MULES (http://www.cfd-online.com/Forums/openfoam-programming-development/98597-customize-mules.html)

Phicau March 14, 2012 12:43

Customize MULES
 
Dear all,

I need to modify MULES, and therefore convert it to myMULES.

In order to do so I follow the standard procedure copying the three files in my user folder, run rename 's/MULES/myMULES/g' *.* and sed -i 's/MULES/myMULES/g' *.*

I create the Make folder and add the two files:

files
Code:

myMULES.C

LIB = $(FOAM_USER_LIBBIN)/libmyMULES

options
Code:

EXE_INC = \
    -I$(LIB_SRC)/triSurface/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude

LIB_LIBS = \
    -lOpenFOAM \
    -ltriSurface \
    -lmeshTools \
    -lfiniteVolume

Note that in the latter one I have added -lfiniteVolume

Then I try to compile it, but several errors regarding impossibility to locate and load dependencies arise.

¿What else do I have to include?

Thanks a lot

Pablo

Phicau March 14, 2012 13:08

The magic of posting: you then achieve what you want in 5 minutes.

files
Code:

myMULES.C

LIB = $(FOAM_USER_LIBBIN)/libmyMULES

options
Code:

EXE_INC = \
    -I$(LIB_SRC)/triSurface/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \
    -lOpenFOAM \
    -ltriSurface \
    -lmeshTools \
    -lfiniteVolume

and if you want to integrate the new MULES in myInterFoam:

files
Code:

myInterFoam.C

EXE = $(FOAM_USER_APPBIN)/myInterFoam

options
Code:

EXE_INC = \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I./myMULES

EXE_LIBS = \
    -ltwoPhaseInterfaceProperties \
    -lincompressibleTransportModels \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lfiniteVolume \
    $(FOAM_USER_LIBBIN)/libmyMULES.so

regarding that the 3 custom MULES files are within the myMULES folder in the root of myInterFoam


All times are GMT -4. The time now is 12:22.