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

MRFZone.C compiling

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 14
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: 284
Blog Entries: 5
Rep Power: 21
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: 14
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: 284
Blog Entries: 5
Rep Power: 21
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


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 Off
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 3 August 27, 2018 04:22
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 06:31
Discussing UDF and C++ Compiling Big Stone FLUENT 9 April 12, 2004 15:07


All times are GMT -4. The time now is 17:33.