Coupling cantera to C++ CFD solver

148 views
Skip to first unread message

Cristopher Morales

unread,
Sep 2, 2024, 3:33:40 PM9/2/24
to Cantera Users' Group
Dear all, 

I hope you are doing well, I am Cristopher Morales Ubal, PhD Candidate at TU Eindhoven. I am working in a CFD solver written in C++, I would like to ask you where I can read about how to compile Cantera with it? I use meson and the ninja for compiling. I would like to clone Cantera to a folder within the solver called subproject and then call the Cantera functionalities in a fluid model.
I hope you can guide me how to do it.

Thank you so much in advance

Cristopher Morales Ubal

Cristopher Morales

unread,
Sep 3, 2024, 7:32:42 AM9/3/24
to Cantera Users' Group
Dear all, 

I would like to change where the Cantera library is allocated, I followed the guidelines in the website about building and compiling with Scons. Although the compilation does not show any error, I got the following message in the screen. Is it possible to change where the library files can be allocated? 
Thank you so much in advance,

Cristopher Morales Ubal

path_cantera_library_.jpg

Cristopher Morales

unread,
Sep 3, 2024, 7:49:43 AM9/3/24
to Cantera Users' Group
Could it be related to that I installed cantera for python using Anaconda before?

Cristopher Morales

unread,
Sep 3, 2024, 8:40:23 AM9/3/24
to Cantera Users' Group
I tried to compile in my C++ code but I got this error:
Compilation_error.PNG

Chris N

unread,
Sep 3, 2024, 11:37:08 AM9/3/24
to Cantera Users' Group
You can set the install directory by using the prefix=/path/to/your/folder .

Chris N

unread,
Sep 3, 2024, 11:41:05 AM9/3/24
to Cantera Users' Group
It looks like your code might not be able to access the fmt external library header files that are provided in the Cantera installation. If you go to where your Cantera installation is located, and look in the include/cantera/ext/fmt directory, you'll see those files there. I suspect that maybe your Makefile is not providing a path to the Cantera header files directory and that is causing the complaints from the compiler about not being able to locate that fmt.h file.

Cristopher Morales

unread,
Sep 5, 2024, 10:20:22 AM9/5/24
to Cantera Users' Group
Dear Chris N,

Thank you so much for your answer !!

Reply all
Reply to author
Forward
0 new messages