复制要修改的库
把/opt/openfoam5/src/lagrangian
下的spray intermediate
两个文件夹复制到/home/llp/OpenFOAM/zjdxllp-3.0.1/src/lagrangian
修改库的编译路径
把需要改变的两个新库编译到FOAM_USER_LIBBIN
下,即
- 把
internediate
文件下的Make/files
最后一行改为
LIB =$(FOAM_USER_LIBBIN)/liblagrangianIntermediate
- 把
spray
文件下的Make/files
最后一行改为
LIB = $(FOAM_USER_LIBBIN)/liblagrangianSpray
- 把
spray
文件夹下的Make/options
的lagrangian库路径改一下,使编译spray
库时用的是我们新创建的lagrangian
库
LIB_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-llagrangianIntermediate \
-L$(FOAM_LIBBIN) \
-llagrangian \
-llagrangianTurbulence \
-ldistributionModels \
-lspecie \
.....
需要修改的库
intermediate/parcels/Templates/ThermoParcel/ThermoParcelTrackingDataI.H
intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C
intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C
- 用
grep "NEW" * -R -n -C 5
命令在目标文件夹下寻找修改的地方
求解器sprayFoam
的修改
-
sparyFoam
改成pingFoam
sparyFoam.C => pingFoam.C
-
Make下的
files
pingFoam.C
EXE = $(FOAM_USER_APPBIN)/pingFoam
-
Make下的
options
EXE_INC = \
-I$(WM_PROJECT_USER_DIR)/src/lagrangian/intermediate/lnInclude \
-I$(WM_PROJECT_USER_DIR)/src/lagrangian/spray/lnInclude \
EXE_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-llagrangianIntermediate \
-llagrangianSpray \
-L$(FOAM_LIBBIN) \
-lturbulenceModels \
-lcompressibleTurbulenceModels \