CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Modifying OF library

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2014, 10:22
Default Modifying OF library
  #1
New Member
 
Join Date: May 2014
Posts: 4
Rep Power: 11
GPL65 is on a distinguished road
Hi,
I'm a new forum user and I hello everyone, sorry for my english.
I'm trying to modify a OF library (KinematicCloud.H) but I don't want overwrite the program files.
Is it possible to put the user file in another location and link to it?
GPL65 is offline   Reply With Quote

Old   May 16, 2014, 07:00
Default
  #2
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
KinematicCloud.H is part of a templated library. It's not straight forward to make changes to KinematicCloud.H without recompiling the whole shebang, i.e. liblagrangianIntermediate.

What are you trying to do?
dkxls is offline   Reply With Quote

Old   May 16, 2014, 09:16
Default
  #3
New Member
 
Join Date: May 2014
Posts: 4
Rep Power: 11
GPL65 is on a distinguished road
I have written a modify to this template class (I have added a function to this class), to do not overwrite the existing library I have copied it to my user source dir and I have compiled to my user lib dir, then I link solver to it (w/ Make/options files).

Is it a good job?

Thank you for patience.
GPL65 is offline   Reply With Quote

Old   May 16, 2014, 09:25
Default
  #4
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
I doubt that this will work just like that. Though I'm not quite sure.

So you are just interested in a KinematicCloud? No thermodynamics, collisions, ...
dkxls is offline   Reply With Quote

Old   May 16, 2014, 09:42
Default
  #5
New Member
 
Join Date: May 2014
Posts: 4
Rep Power: 11
GPL65 is on a distinguished road
It seems to work, I wrote a function that calculate the penetration of a scalarField along injector direction, because I will use this function more and more I have inserted in this class (in analogy with liquid penetration)

My doubt is on the "orthodoxy" of this method, there is a smarter solution?

// Example of Make/options
EXE_INC = \
-I../include \
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(FOAM_USER_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/spray/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude


EXE_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-lfiniteVolume \
-lmeshTools \
-lsampling \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels \
-llagrangian \
-llagrangianTurbulence \
-llagrangianSpray \
-llagrangianIntermediate \
-lspecie \
-lfluidThermophysicalModels \
-lliquidProperties \
-lliquidMixtureProperties \
-lsolidProperties \
-lsolidMixtureProperties \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lfvOptions \
-lcombustionModels
GPL65 is offline   Reply With Quote

Reply


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
[Other] Multi species mass transport library [update] novyno OpenFOAM Community Contributions 111 November 9, 2021 23:37
ERROR: unable to find library HJH CFX 6 February 26, 2019 06:52
problem loading UDF library in parallel cluster Veera Gutti FLUENT 8 July 26, 2016 07:24
Compiled library vs. inInclude Files, DSMC solver crashes after run GPesch OpenFOAM Programming & Development 8 April 18, 2013 07:17
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 15:49


All times are GMT -4. The time now is 21:09.