User Tools

Site Tools


howto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howto [2015/09/23 15:56]
fabian
howto [2015/09/23 16:04] (current)
fabian
Line 85: Line 85:
 === Providing initial conditions in ascii format === === Providing initial conditions in ascii format ===
 Use case: you have an ascii file containing a list of particles (positions, velocities, masses).\\ Use case: you have an ascii file containing a list of particles (positions, velocities, masses).\\
-In this case, set ''​filetype='​ascii''',​ and ''​initfile={dirname}''​ arbitrarily. RAMSES will look for your initial conditions in ''​./{dirname}/​ic_part'',​ and expects data in the form {x,y,z, vx,vy,vz, m}.+In this case, set ''​filetype='​ascii''',​ and ''​initfile={dirname}''​ arbitrarily. RAMSES will look for your initial conditions in ''​{dirname}/​ic_part'',​ and expects data in the form {x,y,z, vx,vy,vz, m}.
  
 <​code>​ <​code>​
Line 97: Line 97:
  
  
-=== Dealing with N-body ​units === +=== Using astronomical ​units === 
-The requirement ''​G=1''​ constraints the choice of unit system. E.g., in astronomical units, G is //not// 1. So, if you would like to use astronomical units, you need to add an additional scaling step to the read-in routine(s).+The requirement ''​G=1''​ constraints the choice of the unit system. E.g., in astronomical units, G is //not// 1. So, if you would like to use astronomical units, you need to add an additional scaling step to the read-in routine(s).
  
-Extract ​the following file in ''​ramses/​patch/''​:\\+Below, I share a version of the "​phantom" ​patch that reads in astronomical units:\\
 {{::​phantom_units.tar|}}\\ {{::​phantom_units.tar|}}\\
-This tarball contains another RAMSES ​patch, that is the "​phantom"​ patch plus...\\+This "​phantom_units" ​patch is the "​phantom"​ patch plus...\\
 + units.f90 (with Msun, kpc, G=1)\\ + units.f90 (with Msun, kpc, G=1)\\
 + modified read-in routines that convert astronomical units (Msun, kpc, km/s) to N-body or "user units" as used internally in RAMSES. + modified read-in routines that convert astronomical units (Msun, kpc, km/s) to N-body or "user units" as used internally in RAMSES.
  
-To apply this patch, you need to set+Extract ​this file in ''​ramses/​patch/''​. To apply it to the code, set
 <​code>​ <​code>​
 PATCH=../​patch/​phantom_units PATCH=../​patch/​phantom_units
Line 113: Line 113:
  
 === Download and run samples === === Download and run samples ===
-1. Download a sample from the [[samples|samples page]].\\ +You can find samples at the [[samples|samples page]].\\
-2. Unpack the files.+
  
 Each sample contains a so called //​namelist//​ file, and the particle initial conditions (pos, vel, mass) in ''​ic_part''​. Each sample contains a so called //​namelist//​ file, and the particle initial conditions (pos, vel, mass) in ''​ic_part''​.
 In the sample directory, run In the sample directory, run
 <​code>​ <​code>​
-mpiexec -n {number of cores} {ramses location}/​bin/​ramses3d ​{namelist file}+mpiexec -n {number of cores} {ramses location}/​bin/​ramses3d ​parameters.nml
 </​code>​ </​code>​
howto.txt · Last modified: 2015/09/23 16:04 by fabian