CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   modifying lagrangian library (https://www.cfd-online.com/Forums/openfoam-programming-development/191316-modifying-lagrangian-library.html)

wolfindark August 7, 2017 04:48

modifying lagrangian library
 
Dear All
I want to modify the src/lagrangian/intermediate/parcels/Templates/ThermoParcel/*
basically, heat transfer from the droplets.

I copy whole lagrangian directory to mylagrangian and make changes. It compiles without any problem, but when I run the case it gives some errors for the duplication.

is there any practical way of modification of those template classes?

PK1 August 13, 2017 17:57

Quote:

Originally Posted by wolfindark (Post 659719)
Dear All
I want to modify the src/lagrangian/intermediate/parcels/Templates/ThermoParcel/*
basically, heat transfer from the droplets.

I copy whole lagrangian directory to mylagrangian and make changes. It compiles without any problem, but when I run the case it gives some errors for the duplication.

is there any practical way of modification of those template classes?

This is tricky due to the complex ways in which templating is applied here.

There are two basic ways:

1. Do a copy of the whole lagrangianintermediate library, do your modifications here and link your solver / sprayFoam (?) against that library.

2. Have a look at how the lagrangianspray library does this and uses parcel/include/*.H and Make/files to create the templates and make sure it is built.

You chose 1.
Did you use the libs() option in the controlDict?
If yes, try linking it at build time (using your lib in Make/options of your solver instead of lagrangianintermediate). That should hopefully do the trick :)


All times are GMT -4. The time now is 04:49.