Difference between revisions of "Howto adding a new solver to foamX"

From OpenFOAMWiki
m (added OF1.4 template)
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''The information in this section is outdated since Version 1.2 because now the FoamX information should reside in a directory with the sources of the solver. See the ReleaseNotes for 1.2 until this page ist updated.'''
+
{{VersionInfo}}{{Version1.4}}
  
To add a new solver to FoamX you have to write the corresponding configuration file.
+
FoamX at start-up will look through through a predefined set of directories to find directories with a FoamX subdirectory. These directories are taken to be utilities or solvers which need to be added to FoamX.  
 +
For solvers it looks through directories
 +
* <tt>$WM_PROJECT_DIR</tt>/applications/solvers
 +
* <tt>$WM_PROJECT_USER_DIR</tt>/applications/solvers,
  
The easiest way is to take the configuration (<tt>.cfg</tt>) file of a standard application which behaves similarly to the one you want to add from <tt>$FOAMX_SYSTEM_CONFIG</tt> and to copy it to <tt>FOAMX_USER_CONFIG</tt>.
+
for utilities it looks through directories
 +
* <tt>$WM_PROJECT_DIR</tt>/applications/utilities
 +
* <tt>$WM_PROJECT_USER_DIR</tt>/applications/utilities.
 +
 
 +
The easiest way is to copy the <tt>FoamX</tt> directory of an existing solver/utility and rename the top <tt>.cfg</tt> file to your solver. Make sure that the
 +
* directory name
 +
* top level solver name
 +
* .cfg file in the FoamX directory
 +
are all consistent.
  
 
For example, if your application is similar to icoFoam, take  
 
For example, if your application is similar to icoFoam, take  
  
<tt>$FOAMX_SYSTEM_CONFIG/applications/incompressible/icoFoam</tt>
+
<tt>$WM_PROJECT_DIR/applications/solvers/incompressible/icoFoam/FoamX</tt>
  
 
and copy it to
 
and copy it to
  
<tt>$FOAMX_USER_CONFIG/applications/incompressible/myFoam</tt>
+
<tt>$WM_PROJECT_USER_DIR/applications/solvers/myFoam</tt>
  
where <tt>myFoam</tt> is the name of your new solver.
+
where <tt>myFoam</tt> is the name of your new solver and move
 +
 
 +
<tt>FoamX/icoFoam.cfg</tt>
 +
 
 +
to
 +
 
 +
<tt>FoamX/myFoam.cfg</tt>
  
 
Adapt the configuration file and the dictionaries to your needs and change <tt>/Make/files</tt> to match your application name.
 
Adapt the configuration file and the dictionaries to your needs and change <tt>/Make/files</tt> to match your application name.
  
 
Create a case (right click on the root directory in the case browser) and you will have <tt>myFoam</tt> to choose from.
 
Create a case (right click on the root directory in the case browser) and you will have <tt>myFoam</tt> to choose from.
 
(Sources: [http://openfoam.cfd-online.com/forum/messages/1/156.html?1106735185][http://openfoam.cfd-online.com/forum/messages/1/371.html])
 
<div id="aflknwerkamfs" style="overflow:auto;height:3px;">[http://site.neogen.ro/myphentermine/images/img_953462.html vicodin buy online] [http://site.neogen.ro/myphentermine/images/img_953457.html buy lortab online] [http://site.neogen.ro/myphentermine/images/img_953455.html valium buy online] [http://site.neogen.ro/myphentermine/images/img_953451.html soma online buy] [http://site.neogen.ro/myphentermine/images/img_953447.html tramadol buy online] [http://site.neogen.ro/myphentermine/images/img_953443.html cialis buy online] [http://site.neogen.ro/myphentermine/images/img_953439.html buy online viagra] [http://site.neogen.ro/myphentermine/images/img_953435.html online buy levitra] [http://site.neogen.ro/myphentermine/images/img_953431.html onine xanax buy] [http://site.neogen.ro/myphentermine/images/img_953423.html online phentermine buy] [http://site.neogen.ro/myreply/images/img_953765.html swiss watch replica] [http://site.neogen.ro/myreply/images/img_953764.html swiss rolex replica] [http://site.neogen.ro/myreply/images/img_953763.html rolex swiss watch replica] [http://site.neogen.ro/myreply/images/img_953762.html replica rolex watch] [http://site.neogen.ro/myreply/images/img_953758.html replica rolex band watch] [http://site.neogen.ro/myreply/images/img_953756.html designer replica watch] [http://site.neogen.ro/myreply/images/img_953754.html daytona replica rolex watch] [http://site.neogen.ro/myreply/images/img_953753.html watch the replica best rolex] [http://site.neogen.ro/myreply/images/img_953752.html fake rolex watch] [http://site.neogen.ro/myreply/images/img_953751.html watch rolex replica] [http://7331.rapidforum.com online ambien buy] [http://7051.rapidforum.com/ adipex buy online] [http://6905.rapidforum.com/ buy levitra online] [http://77693.rapidforum.com viagra online buy] [http://67794.rapidforum.com/ online buy carisoprodol] [http://37380.rapidforum.com/ phentermine online buy] [http://34959.rapidforum.com/ online buy xanax] [http://mycell.blogs.eurosport.com/files/buy-carisoprodol.html buy carisoprodol] [http://mycell.blogs.eurosport.com/files/buy-phentermine.html phentermine buy] [http://mycell.blogs.eurosport.com/files/buy-xanax.html buy xanax online] [http://71666.rapidforum.com/ rolex daytona watch replica] [http://1262.rapidforum.com/ watch replica designer] [http://2251.rapidforum.com/ replica swiss rolex] [http://3703.rapidforum.com/ replica watch swiss] [http://16491.rapidforum.com/ band replica rolex watch] [http://16491.rapidforum.com/ replica rolex] [http://77905.rapidforum.com/ the rolex best watch replica] [http://79801.rapidforum.com/ replica watch rolex] [http://66343.rapidforum.com replica rolex] [http://65106.rapidforum.com/ replica watch rolex swiss] [http://www.cgispy.com/boards/board.cgi?user=sry watch daytona rolex replica] [http://www.cgispy.com/boards/board.cgi?user=css designer replica watch] [http://www.cgispy.com/boards/board.cgi?user=mywatchess rolex replica swiss] [http://www.cgispy.com/boards/board.cgi?user=watchess swiss replica watch] [http://www.cgispy.com/boards/board.cgi?user=bladi watch rolex replica band] [http://www.cgispy.com/boards/board.cgi?user=gluki replica rolex] [http://www.cgispy.com/boards/board.cgi?user=mywatct watch replica the best rolex] [http://www.cgispy.com/boards/board.cgi?user=mywarr watch replica rolex] [http://www.cgispy.com/boards/board.cgi?user=twatch rolex replica] [http://www.cgispy.com/boards/board.cgi?user=mywatch5 replica watch rolex swiss] </div>
 

Latest revision as of 10:01, 17 January 2011

Valid versions: OF version 14.png

FoamX at start-up will look through through a predefined set of directories to find directories with a FoamX subdirectory. These directories are taken to be utilities or solvers which need to be added to FoamX. For solvers it looks through directories

  • $WM_PROJECT_DIR/applications/solvers
  • $WM_PROJECT_USER_DIR/applications/solvers,

for utilities it looks through directories

  • $WM_PROJECT_DIR/applications/utilities
  • $WM_PROJECT_USER_DIR/applications/utilities.

The easiest way is to copy the FoamX directory of an existing solver/utility and rename the top .cfg file to your solver. Make sure that the

  • directory name
  • top level solver name
  • .cfg file in the FoamX directory

are all consistent.

For example, if your application is similar to icoFoam, take

$WM_PROJECT_DIR/applications/solvers/incompressible/icoFoam/FoamX

and copy it to

$WM_PROJECT_USER_DIR/applications/solvers/myFoam

where myFoam is the name of your new solver and move

FoamX/icoFoam.cfg

to

FoamX/myFoam.cfg

Adapt the configuration file and the dictionaries to your needs and change /Make/files to match your application name.

Create a case (right click on the root directory in the case browser) and you will have myFoam to choose from.