|
[Sponsors] |
April 9, 2023, 08:16 |
Print Cp and Cv using function objects
|
#1 |
New Member
Harish Gopal
Join Date: Mar 2023
Posts: 4
Rep Power: 3 |
Hello All,
Hope you are having a great day ! I have a query regarding printing out gas properties like specific heats at constant pressure and volume (Cp and Cv) to the output directories during computation. I am using OF V10 for my computations. The functionObjects method is a cool way to print out any quantity of our interest to the output directory. Therefore, I created two new function objects CpT and CvT, which essentially prints out the product of specific heats and temperatures. I basically created two copies of the functionObject for Mach number and edited it wherever necessary and changed the mathematical expressions (please see attached my function CpT files). After this, I went to the top level Make directory '/src/functionObjects/field/' and modified the Make/files so that these two functions were added to it. (also see my Make/files document attached) After this, I did wmake on the top level directory to generate the library 'libfieldFunctionObjects.so' - the make was fine and worked well without any errors. However, when I try to use the CpT function object it simply does not appear in the available list of functionObjects and I get the following error when I try to use it: --> FOAM FATAL IO ERROR: Cannot find functionObject configuration file CpT Available configured functionObjects: 89 ( CourantNo Lambda2 .... ... ...) Please, I would be extremely grateful if someone can point out where I am going wrong. Any suggestions, tips and pointers would be very useful please. Am I perhaps, missing some step during compilation of the functionObjects. Please not that I am not modifying the source code in the /opt/openfoam directory but I am creating a local copy in my $WM_PROJECT_USER_DIR directory to make the modifications and then only copying the libfieldFunctionObjects.so file to the source directory in /opt/openfoam Thanks a lot and looking forward to your response ! Harish |
|
|
|