|
[Sponsors] |
Compile solver with custom thermophysicalModels |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 6, 2019, 11:30 |
Compile solver with custom thermophysicalModels
|
#1 |
New Member
Vincent
Join Date: Aug 2019
Location: Germany
Posts: 14
Rep Power: 7 |
Hello everyone,
I want to to simulate the warming of PCM (phase change material). In approximation their phase change has constant volume. To attribute for the heat of fusion, I want to model a very high cp value, while using the regular cp value for the solid and fluid state. I found an already existing tabularThermophysicalPropertiesModel. Following all the given steps, tutorials and the documentation I've been able to: -create my own solver -> chtPCMFoam (equals chtMultiRegionFoam) -compile the tabularThermophysicalPropertiesModel -run the tutorial to check if the tabular model is installed correctly Now I want to add the tabular model to my own solver, but it is giving me a hard time. As far as I understand it, I have to make changes to the Make/options file, and link my lnInclude and my shared libraries in there. The libraries seem to work like this: Code:
EXE_LIBS = \ -L{$FOAM_USER_LIBBIN} \ -L{$FOAM_USER_LIBBIN}/libTabularThermophysicalModels.so \ -L{$FOAM_USER_LIBBIN}/libuserspecie.so Code:
EXE_INC = \ -I$(HOME)/cfd/CFD/newSolver/tabulatedThermophysicalProperties-Feature_OF7/src/thermophysicalModels/specie/lnInclude \ -I$(HOME)/cfd/CFD/newSolver/tabulatedThermophysicalProperties-Feature_OF7/src/thermophysicalModels/basis/lnInclude Code:
wmakeLnIncludeAll: running wmakeLnInclude on dependent libraries: unknown option: '-I/home/cfd/CFD/newSolver/tabulatedThermophysicalProperties-Feature_OF7/src/thermophysicalModels/specie/lnInclude' Usage: wmakeLnInclude [OPTION] dir options: -update | -u update -silent | -s use 'silent' mode (do not echo command) -help | -h print the usage Link all the source files in the <dir> into <dir>/lnInclude Note The '-u' option forces an update when the lnInclude directory already exists and changes the default linking from 'ln -s' to 'ln -sf'. wmakeLnInclude error: base directory \ does not exist unknown option: '-I/home/cfd/CFD/newSolver/tabulatedThermophysicalProperties-Feature_OF7/src/thermophysicalModels/basis/lnInclude' |
|
September 22, 2020, 11:30 |
|
#2 |
Member
ssa
Join Date: Sep 2018
Posts: 93
Rep Power: 8 |
Did you solve this error.? I am facing the same problem.
|
|
September 23, 2020, 05:30 |
|
#3 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 8 |
Hey, to use wmake correctly, please check this page: https://cfd.direct/openfoam/user-gui...g-applications . You may for instance realize that the L prefix is to include an additional directory to the library lookup path and cant be used as shown in the initial post. It should be something like this:
Code:
EXE_LIBS = \ -L<PATHTODIRCONTAININGLIBFILES> \ -l<libname without "lib"in front and".so" at the end> Code:
EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lTabularThermophysicalModels \ -luserspecie RP |
|
September 23, 2020, 05:34 |
|
#4 |
Member
ssa
Join Date: Sep 2018
Posts: 93
Rep Power: 8 |
The problem is not with EXE_LIBS, The problem is with EXE_INC.
For example if I give -I$/chemistryModel/lnInclude it is not working with openfoam 6. But the same works with openfoam 2.4.x |
|
September 23, 2020, 07:50 |
|
#5 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 8 |
Ok, the problem here is the use of $. In the Make/options $(<asd>) is used to access a predefined name. Type in your terminal
Code:
>echo $FOAM_SRC >echo $FOAM_USER_LIBBIN Your EXE_INC has to give the compiler a location to search for the different header files that you include in your application. The path has to be complete and here using predefined names can be helpful so that you don't have to type <ultralongpathtoOpenFOAM/OpenFOAM-<version>/src> all the time. But this can also look like this Code:
EXE_INC = \ -$(HOME)/myPrivateOpenFOAMLibraries/lib1/lnInclude |
|
Tags |
compile, lninclude, solver |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PEMFC model with FLUENT | brahimchoice | FLUENT | 22 | April 19, 2020 16:44 |
Converting custom solver from old version to openFoam4.1 | Nigel Bruce Khan | OpenFOAM Running, Solving & CFD | 2 | August 11, 2017 11:45 |
Hybrid discretisation - blend factor | gcoopermax | CFX | 5 | September 23, 2016 09:05 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
How to compile an unsteady solver based on solver of MRFSimpleFoam? | renyun0511 | OpenFOAM Running, Solving & CFD | 0 | April 27, 2010 12:16 |