CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Add .C source file to an existing application in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 18, 2010, 09:21
Default Add .C source file to an existing application in OpenFOAM
  #1
Member
 
Mohammad Zakerzadeh
Join Date: Dec 2009
Location: Aachen, Germany
Posts: 40
Rep Power: 7
moh1367 is on a distinguished road
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
moh1367 is offline   Reply With Quote

Old   July 18, 2010, 19:49
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,124
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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
nimasam is offline   Reply With Quote

Reply

Tags
compile, openfoam

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation of OpenFOAM-1.6 on Ubuntu 9.10 marval OpenFOAM Installation 2 March 17, 2010 09:33
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 20:09.