CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

MRFZone.C compiling

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 29, 2012, 05:30
Default MRFZone.C compiling
  #1
New Member
 
Michal
Join Date: Apr 2012
Location: Czech Republic
Posts: 27
Rep Power: 5
majkl is on a distinguished road
Hi,

I've changed the file MRFZone.C and I would like to compile the edited file.
~/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/cfdTools/general/MRF

The make files and options are located several directories up:
~/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume

So I compile in this directory in this way:
wmake all

It compiles all dependent file in the finiteVolume, but my question is: Is it some easier way?(only compile the MRFZone.C)

Thanks.

Michal
majkl is offline   Reply With Quote

Old   July 10, 2012, 06:00
Default
  #2
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11
tomislav_maric is on a distinguished road
You should write your own code in libraries/applications that are separate from the main code tree.

The usual way to do this is as follows:

Copy the .C and .H file into your own directory.
Rename the files : myMRFzone.C, myMRFzone.C (think of better names )
Rename the classes: use an editor with automatic name change executed on mutliple files
Create a Make/{files, options} in this directory (you can see how this looks like for libfiniteVolume.so, you need to only copy the lines from Make/files that pertain to myMRFzone, change the LIB to your name, and the options stay the same).

At the end, you have your own library compiled and ready to use. To use it, go into system/controlDict of a case you are running and put:

libs ("libMyNewLibrary.so");

at the top of the file.
tomislav_maric is offline   Reply With Quote

Old   July 10, 2012, 08:13
Default
  #3
New Member
 
Michal
Join Date: Apr 2012
Location: Czech Republic
Posts: 27
Rep Power: 5
majkl is on a distinguished road
Dear Tomislav,

thanks. I'll try it.

Michal
majkl is offline   Reply With Quote

Old   July 10, 2012, 08:15
Default
  #4
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11
tomislav_maric is on a distinguished road
Quote:
Originally Posted by majkl View Post
Dear Tomislav,

thanks. I'll try it.

Michal
No prob, just ask if you run into trouble, if I catch some time, I'll help you compile it...
tomislav_maric is offline   Reply With Quote

Reply

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
Problem with Compiling UDFs in Ansys Fluent 13 (lnx64) Ali.beh Fluent UDF and Scheme Programming 2 April 8, 2013 18:12
paraview 3.10.1 compiling error (1.6-ext) vkrastev OpenFOAM Installation 7 October 28, 2011 03:17
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 05:40
Dissimilarity in compiling new BC in 32bit OpenSuSE 103 versus 64bit CentOS 50 versus 64bit SLED 100 sponiar OpenFOAM Running, Solving & CFD 3 February 26, 2008 07:31
Discussing UDF and C++ Compiling Big Stone FLUENT 9 April 12, 2004 15:07


All times are GMT -4. The time now is 12:23.