CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Add .C source file to an existing application in OpenFOAM (http://www.cfd-online.com/Forums/main/78316-add-c-source-file-existing-application-openfoam.html)

moh1367 July 18, 2010 09:21

Add .C source file to an existing application in OpenFOAM
 
Hello guys

In my case I need to correct my pressure field in each step. So I have written a .C file to calculate the additional term "dp".
But I don't know how should I insert it in the existing file to make it.
I appreciate any guidance from uou.

Regards
Mohammad

nimasam July 18, 2010 19:49

hi mohammad

you have many options :
1. instead of .C file write a .H file and then add that header file (.H) in ur present solver
2.add ur code to present solver body
3. if you insist to have a .C file you just need to add this source file name in
make/ file
after the name of solver source file name

then compile it with wmake for more information look at userGuide


All times are GMT -4. The time now is 18:07.