Home

CO5BOLD User Manual

image

Contents

1. 51 4 4 7 18 rhd_shortrad formal t01 o 000000000004 51 4 4 7 19 rhd_shortrad_stept0l o e e 51 CONTENTS 5 4 4 7 20 MSrad raytas o e a 51 4 4 8 Obsolete Macros 52 4 4 8 1 WDE 2 2s nido ed da a Gee Ween eA a 52 4 4 8 2 rhd hyd roeld 101 52 4 4 8 3 rhd_roeld_slopel01 o o o o eee eee eee 52 4 5 Optimization compiler switches eee 52 4 5 1 OpenMP settings lt e cs er sand ra oe aa a Ed 93 4 5 2 VectorZation y ius str ee a BR A a a BRE de de EE 54 4 5 3 Cache Usages an aa ek ele a a a BE de wt Ed 54 4 5 4 AS le san en ee et Bek ABE A de bd eed be 55 4 5 5 Single versus double precision o e 55 4 6 Specific machines amp compilers een 55 4 6 1 Cray SM Ansarat a 4 dat eA epee o a AA A a ee 56 by gS Gete Da en ae ek a ee 56 4 6 3 Hewlett Packard V 2500 sro an a ER eek Ye a a a a 56 4 6 4 Hewlett Packard Itanium 2 2 2 20 0 0 00 a 57 4 6 5 Hitachi SR8000 i sia ok nce eeen 58 4 6 6 IBM nnn Ne ae Beg a E AN RAN aren ae ea done le ee a E 60 4 6 7 Linux PGI compiler o oaa a 61 4 6 8 Linux ntel compiler a eco ocs a ee ware a a a 61 4 6 9 Linux PathScale compiler eeen 64 4 6 10 Linux GNU g95 compiler 65 4 6 11 Linux GNU gfortran compiler oa aaa a 65 4 6 12 NEG SA 0 5 X 6 SAB ae si ern ag eg eee Ee BETE E ee Slee HE a 65 40 13 SGE Or
2. _hyd_upwind_p01 rhd_hyd_upwind_p01 write ncp A I6 rhd _roeld_flux_101 gt rhd_roeid_flux_101 write ncp A I6 rhd _mpi_101 gt rhd_mpi_101 14 ifdef rhd_bound_t01 TH write ncp A A zrhd _bound_t01 gt defstr else 14 write ncp A A zrhd _bound_t01 gt undefstr LE endif 14 4 ifdef rhd_roeid_flux_t01 TH write ncp A A zrhd _roeld_flux_t01 gt defstr 4 else write ncp A A xrhd _roeld_flux_t01 gt undefstr TH endif 14 ifdef rhd_roeid_step_t01 4 write ncp A A zrhd _roeld_step_t01 gt defstr else 14 write ncp A A rhd _roeld_step_t01 gt undefstr TH endif 14 end subroutine rhd_hyd_SwitchInfo 82 CHAPTER 5 PROGRAMMER S GUIDE 5 6 Unit tests For a number of subroutines in a few modules there exist automated unit tests The master unit test routine hd unitt UT_module F90 and the corresponding main program hd unitt rhdut F90 reside in for hd unitt The Makefile is produced with the usual configure script see Sect 4 3 The usual environment variables e g for optimization are still valid However the unit testing is controlled with the variable F90_UNIT and the new make target is UT or rhdut exe A complete installation compilation and run of the unit tests could look lik
3. 52 56 we finally obtain the relation for the specific heat at constant pres sure Alternatively Cp can be obtained from Eq 32 or 63 We can now express the thermodynamic coefficients provided by CO5BOLD in terms of c l1 T3 and Vad or from once and xr are known see below 2 3 A COLLECTION OF THERMODYNAMIC RELATIONS M STEFFEN AIP We consider again Eq 39 replacing de by de de de 5 dT d Ga Cae P _ 1 fe f1 e p d 35 7 7 ra The requirement that the mixed derivatives must be equal then yields 0 1 de 1 fee p Op T OT OF XT Op r Tp SO or o 0 1 1 Op p TS Terp EA TP Finally Comparison with Eq 69 implies er B PY p Op p 1 de 1 de p d bsy a er E cl a Similarly replacing de by in Eq 39 we get 27 68 69 71 72 75 28 CHAPTER 2 EQUATIONS and the requirement that the mixed derivatives must be equal then yields o 1 Oe Bft 70 p 79 Op T Op Op T dp p TP P P de or _ ar de p 17 80 Op Op O O Pf P de Om7 _ OMT p de El A 81 Op Olmp dnp p Op P P Oln OlnT Olnp HO me Paty mit 0 E p Clip mn Olnp we finally obtain using Eqs 29 and 70 or or Since and The isothermal sound speed is then obtained as 85 2 3 5 Ideal gas with constant specific heats polytropic gas In thi
4. 84 CHAPTER 6 DATA FILE TYPES File Sect I O Type Description rhd exe executable main program rhd par I ctrl data UIO central control file rhd par2 7 1 22 1 I ctrl data UIO additional control file rhd stop 77 I ctrl empty file to force controlled stop of simulation rhd cont I ctrl empty file to force continuation after stop rhd dump I ctrl empty file to request output of current model data eos I data UIO tabulated equation of state data opta l I data tabulated opacities rhd sta I data UIO start model e g end file of last run rhd done O status text exit status written if run was successful rhd end O data UIO end model rhd full O data UIO sequence of 2D or 3D snapshots large rhd mean O data UIO horizontal and spherical means intensity rhd mcyl O data UIO azimuthal means of global models rhd chu1 O data UIO small chunk of full dataset written often rhd chu2 O data UIO small chunk of full dataset written often rhd chu3 O data UIO small chunk of full dataset written often rhd snap O data UIO model snapshot if requested rhd out 8 6 O data text human readable text output data dat I data text chemical reaction data data atom I data text HION data file model atom edens dat I data UIO HION data file electron density table abundance input I data text HION data file abundances pf_kurucz dat I data UIO HION data file partition functions HION time
5. Linear Possible values are e Constant Use a local drag force that depends on core radius r0_grav local sound speed and real c_coredrag default The overlaid radial profile is a constant 112 CHAPTER 7 INPUT AND CONTROL FILES e Linear Use a local drag force that employs as overlay a linear decay from center to r0_grav e Cosine Use a local drag force that employs as overlay a cosine function from center to r0_grav e CosSqr Use a local drag force that employs as overlay a cosine function from center to r0_grav e Constant Radial Use the same radial profile as Constant but apply the drag force to the radial velocity component only e Linear Radial Use the same radial profile as Linear but apply the drag force to the radial velocity component only e Cosine Radial Use the same radial profile as Cosine but apply the drag force to the radial velocity component only e CosSqr Radial Use the same radial profile as CosSqr but apply the drag force to the radial velocity component only e Constant Meridional Use the same radial profile as Constant but apply the drag force to the meridional velocity components only x3 is the z axis Linear Meridional Use the same radial profile as Linear but apply the drag force to the merid ional velocity components only e Cosine Meridional Use the same radial profile as Cosine but apply the drag force to the merid ional velocity components only e CosSqr Meridional Use t
6. To activate OpenMP in the CO5BOLD executable you have to set the corresponding environment variable see before calling the configure script like export F90_PARALLEL openmp configure make This will insert the corresponding compiler switch e g openmp omp mp confer the following sections into the compiler calls in the Makefile see Sect 4 3 The calls to the timing routines that would be executed in parallel are removed by not setting the appropriate compiler macros see Sect 4 4 In addition the switch rhd_shortrad_dir_102 see Sect 4 4 7 16 might be set according to expe rience about performance enhancements The user has to find optimum values for the parameters n_hydcellsperchunk for the Roe and the HLLMHD solver module see Sect 7 1 8 9 and n_viscellsperchunk for the tensor viscosity module see Sect 7 1 11 17 to optimize the size of the chunk given to one thread per time For the Roe solver of the hydrodynamics module there exist also the optional parameters n_hydcellsperchunk2 see Sect 7 1 9 1 and n_hydcellsperchunk3 see Sect 7 1 9 2 For several modules the environment variable OMP_SCHEDULE can be set before running CO5BOLD to control its OpenMP scheduling behavior Important parallel loops in the SHORTrad module have a SCHEDULE RUNTIME modifier that allows this external control The old default is achieved by not defining the variable or by setting export OMP_SCHEDULE STATIC 1 On some
7. local machine e sun4u Sun e See the header of the configure script for an up to date list e local local machine default e dummy do not use any machine dependent flags but use module selections e empty compiler flags are composed from F90_PREFLAGS and F90_POSTFLAGS only 4 3 1 17 F90_BASEPATH Path for the COSBOLD base directory e gt gt the configure script tries to determine the base directory name automatically default This should work if the local directory is located somewhere below hd rhd e otherwise this string is used as base directory name e g home user for Some examples can be found in Sect 4 2 4 4 Compiler macros Some of the modules of the CO5BOLD code with suffix F90 employ compiler macros to switch between code versions during compile time Typically you define at least one of the three switches rhd_r01 rhd_r02 or rhd_r03 to choose a radiation transport module The others have reasonable default values To find the combination with the optimal performance you should look into Sect 4 5 The macros are sorted into different categories Some activate a certain feature like a radiation transport module or the dust module They have to be selected by the user typically via environment variables and the configure script see Sect 4 3 each time the code is compiled for a certain purpose 4 4 COMPILER MACROS 41 Other macros are meant to improve the performance by offering the
8. 2 3 ray direction 3 0 707105 0 000000 0 707109 Main 3 3 ray direction 3 0 707105 0 000000 0 707109 Time step ratio dtime dtime_rad 1 750409E 01 dtime_ rad drhoei limit_this all 6 667E 02 2 510E 03 6 276E 02 0 000E 00 n_subdtime 2 minmax T 1 116348E 03 1 630658E 05 Main 1 3 ray direction 1 1 000000 0 000000 0 000000 Main 2 3 ray direction 3 0 000000 0 707105 0 707109 Main 3 3 ray direction 3 0 000000 0 707105 0 707109 Time step ratio dtime dtime_rad 1 836970E 01 dtime_ rad drhoei limit_this all 6 353E 02 3 188E 03 7 971E 02 6 276E 02 n_subdtime 8 minmax T 1 118540E 03 1 630164E 05 Main 1 3 ray direction 2 0 707105 0 707109 0 000000 Main 2 3 ray direction 2 0707105 0 707109 0 000000 5 Main 3 3 ray direction 3 0 000000 0 000000 1 000000 Time step ratio dtime dtime_rad 1 791384E 01 dtime_ rad drhoei limit_this all 6 515E 02 3 894E 03 8 884E 02 4 814E 03 End of rhd_shortrad_step 8 6 TEXT OUTPUT RHD OUT A simulation ends with e g Time step number itime 49050 time 2 6823742E 08 t_job 1 273407E 06 End Computation LA Exit information Requested number of time steps done Exit status 0 In this case a file rhd done see Sect 8 7 is pr
9. 7 1 23 Additional information and obsolete parameters 162 1 1 23 1 Teal abi e goes wan ak Go a eS 4 162 7 1 23 2 Teal AOU s e zn ech eee ge Fak BOR ah GL Bond ek Ace Ben Ge a 162 7 1 23 3 real gol oe on vn oon ap een aeta VG a Re le Ee ee BO 162 7 1 23 4 Teal pam maj es a di doD Go Fo 4 eh ee Ya eae ee ee oh Be een 162 7 1 23 5 real cradkappasmooth 0 0 02 0000 eee eee 162 7 1 23 6 real c radtsmooth o 163 7 1 23 7 character radpressurel e 163 1 1 23 8 real c radtintminfacl eeen 163 7 1 23 9 integer dtimestep_out_fine een 163 7 1 23 10 character outfile fine o aaa 163 7 1 23 11 character outform_fine e 164 7 1 23 12 character outconvfinel e 164 SERA a a We ds ha ten ete E 164 T3 FOS file sr ae ee hie ta a a a AA 164 et Sete Ree A eh ce eee dee ie See he ee he ade ea idas 164 Ee Bie eR Ro REA ae nd AE ek eS 164 tea Re dk Ga RAGS DRO GSR Ar a eee bee SHAR ee Ee EO 165 7 7 Maore control files rhd stop rhd cont rhd dump o o 166 167 8 1 Output model files rhd end rhd full 167 A ee 168 8 3 Files with averaged data rhd mean l o 168 8 4 File with azimuthally averaged data rhd meyl o oo oo 172 RS 174 8 6 Text output rhd out a aaa ee 174 8 7 Additional status and output files rhd done rhd snap o 178 179 edet Ade da a hee a a 179 pi ts a
10. Radiative Energy Flux amp u erg cm 2 s amp ds 0 0 0 0 0 1 label endbox The list above was slightly edited by inserting blanks to improve readability In the meantime several additional entries have been included The identifier of an entry together with the name n and the unit u should give a first hint about the meaning of the quantity The suffix _xmean indicates a simple average The suffix _xmean2 indicates the root mean square average note the simple average is not subtracted Some entries e g ferb_xmean have a hidden b in their name have one element more e g 121 instead of 120 than most of the others and are characterized by the ds keyword see Table 6 4 These quantities are located at the cell boundaries in contrast to the usual cell centered quantities Clearly there are also two sets of axes e g xc3 and xb3 corresponding to the cell or boundary centered quantities Note The total energy flux can be written as sum feb_total feipkgvrb feipb fekb fegb fevb ferb The flux fepb is already part of feipb 8 4 File with azimuthally averaged data rhd mcyl For global models an additional rhd mcyl file can be written It contains azimuthal averages that are particularly useful for global models rotating around the 3 axis The format is usually UIO unformat ted binary An individual dataset in rhd mcyl so far consists only of one box With uiolook st
11. real real time f E13 6 b 4 n time u s time_db f E23 15 b 8 n time u s integer itime f 111 b 4 n time step number u 1 real xc1 d 63 63 63 63 63 63 f E13 6 p 4 b 4 amp n x1 coordinates of cell centers u cm ds 0 0 0 1 0 1 real xc2 d 63 63 63 63 63 63 f E13 6 p 4 b 4 amp n x2 coordinates of cell centers u cm ds 0 1 0 0 0 1 real xc3 d 63 63 63 63 63 63 f E13 6 p 4 b 4 amp n x3 coordinates of cell centers u cm ds 0 1 0 1 0 0 real xb1 d 63 64 63 63 63 63 f E13 6 p 4 b 4 Y n x1 coordinates of cell boundaries u cm ds 0 1 0 1 0 1 real xb2 d 63 63 63 64 63 63 f E13 6 p 4 b 4 amp n x2 coordinates of cell boundaries u cm ds 0 1 0 1 0 1 real xb3 d 63 63 63 63 63 64 f E13 6 p 4 b 4 amp n x3 coordinates of cell boundaries u cm ds 0 1 0 1 0 1 real rho d 63 63 63 63 63 63 f E13 6 p 4 b 4 n Density u g cm 3 167 168 CHAPTER 8 OUTPUT AND STATUS FILES real ei d 63 63 63 63 63 63 f E13 6 p 4 b 4 n Internal energy u erg g real vi d 63 63 63 63 63 63 f E13 6 p 4 b 4 n Velocity 1 u cm s real v2 d 63 63 63 63 63 63 f E13 6 p 4 b 4 n Velocity 2 u cm s real v3 d 63 63 63 63 63 63 f E13 6 p 4 b 4 n Velocity 3 u cm s label endbox label enddataset date 02 01 2002 16 17 43 322 The UIO format is described in some detail in Sect 6 2 Each entry has a type e g label real character an
12. 6 2 7 IDL UIO routines The UIO package for IDL comes as a list of routines with names quite similar to the Fortran90 version Instead of using global variables as in Fortran90 there are now common blocks in Include files k kkk k k k k k ak ak ak ak ak ak 3k 3k IC ak ak A ak I kk 21 21 3K 3K K aK K ak A ACACIA 3K 3K 3K K K K K K CAC K K K K K K K K FK 3K 3K 3K 2K AC Routines functions uio_ pro most important user routine comfortable useful adkeyl Add one keyword to term table keyword value no link character adkey2 Add one keyword to term table with keyword value adkey3 Add one keyword to term table with keyword value or default 5 y chcony Actualize list of conversion types for all channels jk Chpos Give current file position or jump to specified position 5 chung Initialize store and actualize a list of free and occupied unit 3 numbers closrd Close file after reading closwr Close file after writing 3 gt epentr Copy entry from one file to another pow Read data from uio file s in quasi direct access mode data Handle uio file s in quasi direct access mode dataset_rd Read uio file and put data into anonymous structure datasetlist_rd Read data from list of files and put it into an structure E deform Determine the default output format for numbers dim2st Compose dimension string exkeyw Extract value of keyword from table exitrm Extract
13. Again this operation would cause an error if the wanted time step is not contained in the file Via checking the error flag ierr of the routine uio_dataset_rd such errors can be avoided This way it is unnecessary to know exactly of how many time steps the model file consists IDL gt uio_openrd nc modelfile outstr ierr IDL gt i 0 IDL gt repeat begin amp IDL gt ful uio_dataset_rd modelfile channel nc ierr ierr amp IDL gt if ierr eq 0 then begin amp IDL gt Do the data processing here IDL gt i i 1 amp IDL gt endif else begin amp IDL gt print IDL gt Reached EOF amp IDL gt endelse amp IDL gt endrep until ierr ne 0 or E0F nc IDL gt uio_closrd nc To read a number of entries from a list of files in sequence the routine uio_datasetlist_rd pro see Sect 6 2 7 3 is appropriate 10 2 3 Loading the equation of state IDL gt eosfile eos dat par eosfile IDL gt tabinter_rdcoeff eosfile eos The table for the equation of state is provided in the structure EOS NOTE Always check file name and path 10 2 4 Loading the opacity table IDL gt opafile opa dat par opafile IDL gt dfopta opafile The opacity table will be stored as common block OPTA_COMMON NOTE Always check file name and path 10 2 5 Computation of deduced quantities After having read the model data FUL and the tables for the equation of state EOS and opacity OPTA_COMMON see
14. INSTALLATION ip Optimization activate interprocedural optimization within each source file This enables some inlining ipo Optimization enable interprocedural optimization between files The compiler makes a first step with a pre compilation and syntax check for each source file and then finishes the compilation and optimization of all source files together in a second time consuming step It allows some global optimizations and appears to have at least no adverse effects in all recent compiler versions 03 Optimization activate a generally high level of optimization xHost Optimization for hardware optimize for the architecture of the compiling host This flag is recommended although there are a few issues On AMD machines this might work less than perfect because the features of the processors might now be properly recognized check it Compiling with this option on a new machine with a recent set of vector instructions will likely generate code that will nor run on older machines In the rather uncommon case that the COSBOLD executable is distributed a combination of other flags has to be used that ensures that the code runs in an optimal way on a range of machines see below and see the manual tpp6 xK Optimization for hardware old optimize especially for Pentium III and Athlon includes SSE vector commands tpp7 xW Optimization for hardware old optimize especially for Pentium IV inclu
15. M noinv M noinexact M setall Drhd_r03 Drhd_shortrad_step_t01 Drhd_shortrad_formal_t01 DMSrad_raytas 1 Drhd_hyd_entropyfix_p01 1 Drhd_hyd_upwind_p01 1 Drhd_hyd_roeid_101 1 Dgasinter_101 2 4 6 13 SGI Origin CO5BOLD has been compiled and tested on up to 8 processors on the SGI 2000 machine at TAC in Copenhagen and the SGI 3800 machine at the NSC in Link ping The code was used on the UKAFF machines see Sect 4 6 14 and the computers at CINES See e g the test BOT Tern or here Information about the CINES machines can be found under CINES Important switches are e macro_expand Enable macro expansion e mp Enable parallelization with OpenMP directives e INLINE aggressive 0N INLINE list INLINE preempt 0N General keywords for inlining e INLINE must Optimization routines that should be inlined see Sect 4 5 4 e Ofast OPT Olimit 0 General optimization On older compiler versions 03 was the achievable optimum e IPA plimit 5500 Even more optimization This option requires lots of memory gt 1 GByte To get it it might be necessary to ask for more than one processor for the compilation especially on the CINES machines e CG longbranch_limit 60000 This switch limits needed compiler resources It is suggested by the compiler on the CINES machines itself e Drhd_roeid_step_101 1 Slight performance improvement 4 6 14 SGI Origin 2000 3800 at UKAFF CO5BOLD has been also compiled and tested o
16. Pre OOOO oO The default value is 0 0 7 1 15 3 real c_dust01 The density of the grain material is specified with e g real c_dust01 f E15 8 b 4 n Density of grain material u g cm 3 3 3E 00 7 1 15 4 real c_dust02 The atomic weight of the dust monomer is specified with e g real c_dust02 f E15 8 b 4 n Atomic weight of dust monomer u u 140 71 The value 140 71 should be appropriate for forsterite Mg25i04 The unit is the atomic mass unit The default value is 0 0 7 1 15 5 real c_dust03 The number fraction of the rarest component is specified with e g real c_dust03 f E15 8 b 4 n Number fraction of rarest component u 1 amp cO For Mg25i04 Mg is the rarest its fraction is 3 1187E 05 amp cl Mg2Si04 contains 2 Mg gt 1 2 gt 1 55935e 05 1 55935e 05 For Mg2SiO the rarest component is usually Mgs So half the magnesium abundance is required as value The default value is 0 0 7 1 15 6 real c_dust04 The lower dust limit fraction is specified with e g real c_dust04 f E15 8 b 4 n Lower dust limit fraction u 1 1 0E 10 If the density in a bin relative to the gas density falls below this value the bin is completely emptied and the material is added to the bin with the largest dust or monomer density Typical values are 1 0E 09 or so The default value is 0 0 7 1 PARAMETER FILE RHD PAR 143 7 1 15 7 real c_dust06 The sticking coefficient for the condensation rate is
17. UKAFF unformatted unit tests UNIX vectorization viscosity point to point tensor 47 xb1 168 xb2 xb3 168 xc1 168 Hen ze
18. character hdscheme f A80 b 80 n Hydrodynamics scheme amp cO Roe approximate Riemann solver of Roe type ci RoeMagKin Roe solver kinetic magnetic field transport amp c2 RoeMHD HLLMHD MHD solver amp 7 1 PARAMETER FILE RHD PAR 117 c3 None skip hydrodynamics step entirely Roe Possible values are e None The hydrodynamics step is skipped entirely for test purposes Note that in this case some initializations necessary for the generation of the mean file are omitted too e Roe default The standard approximate Riemann solver of Roe type is activated This value will be chosen for pure HD simulations without magnetic fields e RoeMagKin The standard Roe solver is extended to transport passively a magnetic field This is a test implementation to check if the general magnetic field handling works For proper MHD simulations use HLLMHD instead This option is currently deactivated e RoeMHD Use the MHD Roe solver This option is currently deactivated e HLLMHD Use the MHD HLL solver the recommend value for MHD simulations 7 1 8 2 character hdtimeintegrationscheme With this parameter the type of the time integration scheme can be specified as in character hdtimeintegrationscheme f A80 b 80 n Time integration scheme amp c0 Single Hancock Euler1 RungeKutta2 RungeKutta3 Single Possible values are e Single default for HD Roe Compute all updates in one single ste
19. cl 2 non grey opacities if available from table amp c2 3 two bands 1 grey 2 C0 density via XC0 c3 4 two bands 1 grey 2 C0 density from chemistry il Allowed values are e 1 Use the grey part of the table e 2 Use the other possibly non grey frequency dependent part of the table e 3 Use a continuum band plus an infrared band with CO opacity calculated with CO equilibrium density e 4 Use a continuum band plus an infrared band with CO opacity calculated with CO density resulting from time dependent chemistry 7 1 16 3 integer n_radminiter Usually the stability considerations dictate a radiative time step smaller than the hydrodynamics or tensor viscosity time step To remedy this situation it is possible to allow several radiation transport steps per global time step Hitherto all three radiation transport modules support this iteration The minimum number of iterations radiative sub steps can be specified e g with integer n_radminiter f 14 b 4 amp n Minimum number of radiation transport iterations c0 8 1 If less iterations are needed the time step limit for the next step is increased This value will in almost any case for explicit radiation transport be set to 1 In the implicit case it is set to a higher value typically 5 7 1 16 4 integer n_raditer After each complete radiative time step the recommendation for the next time step will be chosen so that n_raditer iterations wi
20. default default default default default default default default default default F90_PARALLEL F9O0_DEBUG F90_LHDRAD F90_MSRAD F90_SHORTRAD F90_CHEM F90_HION F90_DUST F90_MHD F90_TWEAK F90_MACHINE F90_BASEPATH pgf90 byteswapio fast Mvect sse Mcache_align Minfo inline Write compiler name and flags into file compiler_flags info New Makefile written scalar ooo Oo 00 local home bf for 35 A new Makefile is produced An existing one is appended to Makef ile old Additionally the file compiler _flags info is written which contains the compiler call in Fortran format 7 Check the output of the configure script and the header of the new Makefile You get an overview over the existing environment variables that control the configure script see Sect 4 3 with env grep F90_ Obs at the beginning there might be none 36 CHAPTER 4 COMPILATION amp INSTALLATION It is convenient to collect the control environment variables in the configure resource file configurerc During the first call of configure in any directory a template configurerc file is produced 8 Look into the header and if necessary the rest of the configure script or into Sect 4 3 or try configure h to find out how to change the environment variables to control the script For instance if you want to enable debugging options type export F90_DEBUG 1 Restart the configure script after ev
21. dh Tds dp 21 p where the specific enthalpy h is defined as h e p p 22 This implies de pe 2 Ge a 23 e p o a 24 a pP 5 T 25 Sp Oh 1 Ec ee 26 el p me 2 3 2 Definition of often used thermodynamic coefficients Definition of specific heats Oh Os Os v B 7 8 s 0 OT p OT p OlnT a B 3 GE os Definitions of further thermodynamic coefficients _ Olnp xr al 29 dlnp v Fine Ke 30 Olnp XT aT 1 p Snr Xp eo 24 CHAPTER 2 EQUATIONS It can be shown that 2 P 2 p P 3 Cp Cy 0 Ao Xp ip XT cp XT Xe 32 Definition of adiabatic exponents _ Olnp sl amp ik OlnT 4 r CR 34 OlnT o T23 1 Vas Feo T 99 2 3 3 CO5BOLD equation of state CO5BOLD equation of state input CO5BOLD equation of state output pm OP dp 8T en OP 3 5 ee All required thermodynamic coefficients can be expressed in terms of 2 E 2 n ED 2 3 4 Derived thermodynamic coefficients First the missing derivative 35 can be found from the relation e 38 which is obtained from the equality of the mixed derivatives in Eq 20 written as di E 39 s de T rp Then o fl o ee p 40 dedp Op T e Tp i First adiabatic exponent 41 This relation is obtained by combining Eq 20 with the identity Op Op dp 4 42 Sk GE P Ze 42 2 3 A COLLECTION OF
22. real bc2_xmean2 d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Magnetic field 2 amp u G real bc3_xmean2 d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Magnetic field 3 amp 8 3 real real real real real real real real real real real real real real real FILES WITH AVERAGED DATA RHD MEAN 171 u G ei_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Internal energy amp u erg g rhoei_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Internal energy 4 u erg cm 3 rhoek_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Kinetic energy u erg cm 3 rhoeg_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Gravitational energy amp u erg cm 3 t_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Temperature amp u K t_xmean4 d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Temperature amp u K t_xmeankapparho d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Temperature amp u K p_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Pressure amp u dyn cm 2 s_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Entropy amp u erg K g rhos_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Entropy amp u erg K cm 3 gammal_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n 1st Adiabatic Coefficient amp u 1 gamma3_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n 3rd Adiabatic Coefficient amp u 1 delta_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Expansion coefficient amp u 1 kappar
23. real c_radtvisdtau f E15 8 b 4 amp n Optical depth limit for temperature viscosity u 1 0 1 The introduction of this temperature diffusion is a somewhat desperate and inelegant attempt to improve the behavior of the Greens function hot cells should be cooled cool cells should be heated This diffusion is necessary for not well resolved models It is switched off with c_radtvisdtau lt 0 0 7 1 18 2 real c_radtvis Using the LHDrad module the amount of the radiative temperature viscosity temperature smoothing can be specified e g with real c_radtvis f E15 8 b 4 n Temperature viscosity u 1 1 6 For well resolved models it should be switched off with c_radtvis lt 0 0 7 1 18 3 real c radthintimefac In the LHDrad module only the radiative time step restriction due to energy changes can be relaxed further in the optically thin by specifying e g real c_radthintimefac f E15 8 b 4 amp n time scale reduction in optically thin u 1 cO range 0 1 1 0 typically 0 5 0 60 A value lt 0 0 or real c_radtvisdtau lt 0 0 switches off this relaxation 7 1 19 Process time management In this group several parameters can be set which control the start of the time counting during a simulation and the total length of a job If either one of the halt conditions below is met CO5BOLD finishes the current step writes a final model plus some final information to other files and stops execution Fo
24. rhd short characteristics radiation delta tau operator loop 01 in rhd_shortrad_module F90 Category performance enhancement Choose type of short characteristics tau coupling operator Values e 1 case distinction with if then else construct default if rnd_shortrad_operator_101 1 3 5 P e 2 case distinction with masks weights 0 0 or 1 0 default if rhd_shortrad_operator_101 2 4 6 4 4 7 13 rhd shortrad dtauop 102 rhd short characteristics radiation delta tau operator loop 02 in rhd_shortrad_module F90 Category performance enhancement Select the way the operator for the tau coupling short characteristics module is accessed Values e 0 old default The routine with the tau coupling operator is called within a loop and should be inlined e 1 default The program fragment with the tau coupling operator is included No inlining necessary 4 4 7 14 rhd shortrad formal 101 rhd short characteristics radiation formal loop 01 in rhd_shortrad_module F90 Category performance enhancement Select version of loop splitting for exp dtau computation Values e 0 default dtauhalf exp_mdtauhalf exp12t_mdtauhalf are computed in a single loop e 1 dtauhalf exp_mdtauhalf exp12t_mdtauhalf are computed in separate loops This pre vents the SUN1 machine Sunfire Solaris Forte 6 2 from doing some performance degrading optimization 4 4 7 15 rhd shortrad dir1 101 rhd short characteristics r
25. rhdi cmd cat gt nrhd cmd fi le L Move data into backup directory and modify permissions gzip rhd out mv rhd out gz BAKDIR OUTFILE out gz cp p rhd par BAKDIR OUTFILE par mv rhd end BAKDIR OUTFILE end mv rhd fine BAKDIR OUTFILE fine mv rhd full BAKDIR OUTFILE full mv rhd mcyl BAKDIR OUTFILE mcyl mv rhd mean BAKDIR OUTFILE mean mv rhd chul BAKDIR OUTFILE chut mv rhd chu2 BAKDIR OUTFILE chu2 mv rhd chu3 BAKDIR OUTFILE chu3 chmod go r BAKDIR PARFILE BAKDIR OUTFILE chmod go w BAKDIR PARFILE BAKDIR OUTFILE HEHEHE EEE HH RARA RARA RARA RA fi SEE HH Dispose modified command file for next job cp p nrhd cmd STADIR rhd1 cmd Exit loop if end of chain reached if test ACT eoc then 9 2 USING A BATCH SYSTEM break fi End Of loop 5 gt 5 5 done Submit next job if not end of chain reached if test ACT eoc then cd STADIR echo Resubmit job tt usr local bin qsub rhd1 job sub rhd1 job nice nohup rhdi job amp nohup rhd1 job amp else echo End of job chain fi HHHHHRHHHHHHHHHHHHHHHHHHHHRHHHHHHHHHHHHHHHHHHHHHRHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 183 184 CHAPTER 9 RUNNING A SIMULATION Chapter 10 Data analysis with IDL In this section some basic commands for handling CO5BOLD data in
26. the three mass fluxes and the total energy density per volume respectively Each quantity q has its corresponding flux f q and possibly source term s q For convenience p v1 v2 v3 el 2 2 are chosen as independent quantities The conserved quantities are purely algebraic combinations of these The 3D hydrodynamics equations including source terms due to gravity are the mass conservation equation Op pvl 0pv2 Opv3 _ o o o o N a the momentum equation pul pul vl P pul v2 a pul v3 pgl Di pv2 Del pv2 vl z2 pv2v2 P 9x3 pv v3 pg2 2 4 pus pu3 vl pu3 v2 pv3 v3 P p 93 and the energy equation including radiative heating term Qrad Opeik O peikt P v1 O peik P v2 A peik P v3 t Ox1 Ox2 0x3 The pressure P is computed from density p and internal energy ei via a tabulated equation of state p gl vl g2 v2 93 03 Qrad 2 5 P P p a 2 6 For local models the gravity field is simply given by 0 g 0 2 7 g For global models it is given by gl ol i 92 amp e 2 5 93 a3 with eM 2 9 r trt VIF Em 19 20 CHAPTER 2 EQUATIONS Here M is the mass of the star to be modeled rg and r are free smoothing parameters In addition there are equations for the non local radiation transport If grey opacity tables are used the opacities x are a simple function of e g temperature T and pressure P k K T P 2 10 and the source function S is
27. their solar composition 7 1 6 2 character eospath The equation of state file does not have to be in the working directory Instead its path can be specified e g with character eospath f A80 b 80 n path of EOS file amp cO astro b bf for eos dat home bf for eos dat 7 1 7 Opacities 7 1 7 1 character opafile The opacity file can be specified with e g character opafile f A80 b 80 n opacity file name amp c0 g2va opta big_grey opta amp ci empty gt no radiation transport phoenix_opal_grey opta So far there exist already a couple of files for example e davmf opta e f5v opta e g2va opta e g2v_lowhe opta e g2v_m20 opta e g2v opta e hmin_p00 opta e opal_lowhe opta e opal_m05 opta e opal_m10 opta e opal_m20 opta e phoenix_dust_grey opta e phoenix_dust_ob4 opta e phoenix_opal_grey opta e ross_m05 opta e ross_m10 opta e ross_m20 opta 116 CHAPTER 7 INPUT AND CONTROL FILES e sunuri opta e sunur2 opta e t5000g44mm20 opta e t5000g47mm20 opta e t6300g40mm20 opta e t6500g44mm20 opta e zzcetilg opta e zzcetil opta 7 1 7 2 character opapath The opacity file does not have to be in the working directory Instead its path can be specified e g with character opapath f A80 b 80 n path of opacity file amp cO astro b bf for opa dat home bf for opa dat 7 1 8 Hydrodynamics control HD and MHD Many parameters in the control file that are valid for th
28. 0 1 real xc2 d 1 1 1 1 1 1 f E13 6 p 4 b 4 n phi coordinates of cell centers amp u 1 ds 0 1 0 0 0 1 real xc3 d 1 1 1 1 127 127 f E13 6 p 4 b 4 amp n x3 coordinates of cell centers height u cm ds 0 1 0 1 0 0 real xbi d 1 129 1 1 1 1 f E13 6 p 4 b 4 Y n x1 coordinates of cell boundaries radius u cm ds 0 1 0 1 0 1 real xbi_volume d 1 129 1 1 1 1 f E13 6 p 4 b 4 amp n Radius coordinates of cell boundaries volume preserving u cm amp ds 0 1 0 1 0 1 real xb2 d 1 2 1 1 1 1 f E13 6 p 4 b 4 amp n phi coordinates of cell boundaries u 1 ds 0 1 0 1 0 1 real xb3 d 1 1 1 1 127 128 f E13 6 p 4 b 4 amp n x3 coordinates of cell boundaries height u cm ds 0 1 0 1 0 1 real relvol_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Relative Volume amp u 1 real rho_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Density u g cm 3 real ei_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Internal energy amp u erg g real rhoei_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Internal energy amp u erg cm 3 real t_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Temperature u K real p_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Pressure u dyn cm 2 real gammal_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n ist Adiabatic coefficient u 1 real gamma3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n 3rd Adiabatic coefficient u 1 real delta_xmea
29. 110 c_hydexpcourant c_hydexpcourantmax c_hydlowmachcsbase 123 c_hydlowmachcsfactor 122 c_hydpredfactor 128 c_hydsdiffvelo c_hydsmallfluctfactor 123 c_hydsoundcourant c_hydsoundcourantmax c_hydtdifflin 129 c_hydtdiffmach c_hydvdiffvelo 129 c_magphib c_maxeichange c_pchange 109 cputime 151 cputime_remainlimit 151 c_radcourant 155 c_radcourantmax 155 c_raddcool c_raddinci 150 c_radhtautop c_radimplicitmu c_raditereps c_raditerstep c_radmaxeichange 153 c_radscool c_radtcool c_radthintimefac 150 c_radtinci 149 c_radtintminfac 163 c_radtsmooth c_radtvis c_radtvisdtau 150 c_reccontshift c_reccontsteep c_recwenopsifactor 125 c_recwenoweightcenter 125 c_recwenoweightright 125 c_resB c_resBconst 131 real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real 203 c_rescourant 131 c_rescourantmax 131 c_resepsilon 132 c_rhochangetop 110 c_schange 108 c_slopered c_tchange 110 c_test1 c_tminlimit c_tsurf c_v3changelinbottom c_v3changesqrbotton 109 c_visartificial c_visbound c_viscourant loo c_viscourantmax 156 c_visexpansion 134 c_vislinear
30. 134 c_visp2pcoeff 135 c_visp2pincl1 136 c_visp2pincl12 136 c_visprturb c_vissmagorinsky 133 c_vistensordiag c_vistensordiv 135 c_vistensoroff 135 dtime_out_hion dtime_incmax 153 dtime_max 153 dtime_min 152 dtime_min_stop dtime_out_end dtime_out_full dtime_out_mean dtime_start endtime 151 gamma 162 grav luminositypervolume 108 mass_star n_test1 nu_rotation 105 plust ime 152 qmo1 162 r0_core r0_grav ri_grav ri_rad r2_grav rho_min 111 s_infllatgrad s_inflow 108 s_inflradgrad starttime 151 204 real strtest1 161 real teff 103 real time_scaleend 161 real time_scalestart 160 real va_max 132 tensor viscosity 133 time step 152 rhd snap 178 rhd stop Roe solver rotation axis 105 centrifugal force 105 Coriolis force 105 SGI SHORTrad single precision Sparc 195 Sun tensor viscosity 133 tests unit thermodynamic relations adiabatic gradient enthalpy entropy internal energy polytropic gas sound speed specific heats time step 145 timing statistics INDEX total energy flux 172 U10 531199 conversion type 85 85 example 84 86 87 format Fortran 90 IDL 95 Makefile record length unit uiocat 55 94 uio_datasetlist_rd pro uio_dataset_rd pro uioinfo uio_init pro uiolook 94 uio_mac_module 90 uio_struct_rd pro UNIX scripts
31. 144 7 1 16 3 integer n_radminiter 0 0 00000 e eee ee eee 145 7 1 16 4 integer n_raditer eee 145 7 1 16 5 integer n_radmaxiter 2 0 0 00 00 eee ee ee 145 7 1 16 6 character radraybase eeen 146 7 1 16 7 character radraystar ooo ee 146 7 1 16 8 real CAMI sc zoo soan veren vet one Ee ae ea ee ee e 147 7 1 16 9 real c_radimplicitmu 147 7 1 16 10 real craditereps e 147 7 1 16 11 real craditerstep 148 7 1 17 Radiation transport control MSrad only o o 148 7 1 17 1 integer n_radtheta een 148 7 1 17 2 integer n_radphi 148 7 1 17 3 integer n_radsubray e 148 7 1 17 4 integer n_radthickpoint oos ca acs eroe o e a 148 7 1 17 5 integer Nh Tadtautefine o 149 7 1 17 6 integer n_radrsyslevel en 149 7 1 17 7 integer n_radoutput ee 149 7 1 17 8 realc radtcool 1 ee 149 7117 9 real craddcooll o ee 149 11 17 10 real e radscool eee 149 ELITE real grading rsz ar seta A ek Ta a 149 11712 real c raddincif e 150 7 1 18 Radiation transport control LHDrad only o o 150 7 1 18 1 real cradtvisdtau ee 150 7 1 18 2 real c radtvis ses Re ee ee ee 150 7 1 18 3 real c_radthintimefac 0 0 00 0000 000008 150 7 1 19 Process time management 2 eee 150 7 1 19 1 real starttime oaoa a a a a
32. 2 rhd_hyd_entropyfix_pQ1 eee 46 4 4 5 3 rhd_hyd_upwind_pOl 0 020000 00000008 46 4 4 5 4 thd roet fix OL gt s g a ores ee Re a ee 46 4 4 5 5 thd bound tl so d s 8 64 ee ee cars a ee dE ae 46 4 4 5 6 rhd roeld Huxt0ll o e 47 4 4 5 7 rhd_roeld_step_t0l 0 0 000202 ee 47 4 4 6 Hydrodynamics tensor viscosa wenk ska a WR 47 4 4 6 1 rhd vis density pQl 0 0 000202 0b eee eee ee 47 4 4 6 2 rbd vis t0ll o se a eon ed ED Ge a pa Re HE ew 47 4 4 7 Radiation traaspartl a 47 4 4 7 1 PHO gt ee we ASS rr AA RE eG 47 4 4 7 2 PHATA wa on hee a Se Rae ee Cow ed Boas be Rad eae i 48 4 4 7 3 thd 703 orcas hae ee nee eed a Be a a 48 4 4 7 4 rhd_rad3d_torayl0ll o e 48 4 4 7 5 thd rad3sdtromray LOU p gt over ek Pee ee als OR ee 48 4 4 7 6 rhd rad3d r02f ica o a a a eee eS 48 4 4 7 7 rhd rad3d solve t01 eeen 49 4 4 7 8 rhd rad3d _dir t01 eee 49 4 4 7 9 rhd rad3d step t01 eeen 49 4 4 7 10 rhd_shortrad operator l01 o o oo 49 4 4 7 11 rhd shortrad operator l02 0 o 50 4 4 7 12 rhd shortrad dtauopl01 o o o e e 50 4 4 7 13 rhd shortrad dtauopl02 0 o e e 50 4 4 7 14 rhd shortrad formal 101 o e e e 50 4 4 7 15 rhd_shortrad dir OL 2 2 0 020000000000 20 50 4 4 7 16 rhd_shortrad dir 102 51 4 4 7 17 rhd_shortrad lambdal0ll o o
33. 4 amp n Expansion viscosity tensor parameter u 1 1 2 While the standard artificial viscosity acts on compressed regions this viscosity acts in expansion areas Ususally it is not activated c_visexpansion 0 0 However it might be useful in cases were strong localized expansions cause problems 7 1 11 5 real c_vislinear Another viscosity can be activated e g with real c_vislinear f E15 8 b 4 amp n Linear viscosity tensor parameter u 1 1 2 In the formulae for the standard artificial compression Smagorinsky viscosity velocity gradients appear That means that in regions with smooth small amplitude flows these types of viscosity essentially vanish Here the linear viscosity comes in It uses RgasT as approximation for the sound speed that is used in the formula for the kinematic viscosity Ususally it is not activated c_vislinear 0 0 It might be useful to damp small amplitude almost linear waves 7 1 11 6 real c_visprturb The Prandtl number for turbulent mixing can be specified e g with real c_visprturb f E15 8 b 4 amp n Turbulent Prandtl number u 1 8 0 Values between 1 0 and 10 0 appear reasonable Note that larger values lead to smaller amounts of turbulent mixing A value of 0 0 switches off the turbulent mixing terms but not the entire tensor viscosity 7 1 11 7 real c_vistensordiag The factor in the stress tensor in front of of the diagonal terms can be set with real c_vistensor
34. 4 b 4 n x2 coordinates of cell boundaries amp u cm amp ds 0 1 0 1 0 1 real xb3 d 1 1 1 1 1 121 f E13 6 p 4 b 4 n x3 coordinates of cell boundaries amp u cm amp ds 0 1 0 1 0 1 real rho_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Density amp u g cm 3 real vi_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Velocity xi amp u cm s real v2_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Velocity x2 u cm s real v3_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Velocity x3 u cm s real vi_xmean2 d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Velocity xi u cm s real v2_xmean2 d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Velocity x2 amp u cm s real v3_xmean2 d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Velocity x3 u cm s real rhovi_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 n Mass Flux xi u g cm 2 s real rhov2_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Mass Flux x2 amp u g cm 2 s real rhov3_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Mass Flux x3 amp u g cm 2 s real bci_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Magnetic field 1 amp u G real bc2_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Magnetic field 2 amp u G real bc3_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Magnetic field 3 amp u G real bci_xmean2 d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Magnetic field 1 amp u G
35. 5 0 8 recommended 0 6 0 6 Typical choices are e 0 3333333 Give the central polynomial 1 3 of the total weight Together with c_recwenoweightright 0 5 Sect 7 1 9 11 this attributes equal weights to all three stencils e 0 5 Low but reasonable value e 0 6 Recommended value Found by a number of empirical tests to be a good choice together with c_recwenoweightright 0 6666666 Sect 7 1 9 11 e 1 0 Give all weight to the central polynomial This essentially kills the central idea of the WENO scheme and only makes sense for test purposes 7 1 9 11 real c recwenoweightright The WENO style reconstruction schemes VAweno and HBweno but not the Frankenstein versions like FRweno allow to set the basic weights for the stencil of each of the three polynomials The value for the right stencil can be set e g with real c_recwenoweightright f E15 8 b 4 amp n Weight of right polynomial amp cO Reasonable values 0 5 0 8 recommended 0 6666666 0 6666666 Typical choices are e 0 0 Give all weight that does not go to the central polynomial to the left polynomial For test purposes e 0 5 Give left and right polynomial equal weight e 0 6666666 Recommended value Found by a number of empirical tests to be a good choice together with c_recwenoweightcenter 0 6 Sect 7 1 9 10 e 1 0 Give all weight that does not go to the central polynomial to the right polynomial For test purposes 7
36. ADS Wedemeyer S Freytag B Steffen M Ludwig H G amp Holweger H 2004 Numerical simulation of the three dimensional structure and dynamics of the non magnetic solar chromosphere A amp A 414 1121 1137 link to ADS Wedemeyer B hm S Kamp I Bruls J amp Freytag B 2005 Carbon monoxide in the solar atmo sphere I Numerical method and two dimensional models A amp A 438 1043 1057 link to ADS Index alpha AMD axis xbi xb2 xb3 168 xc1 168 xc2 xc3 batch queue big_endian 55 CT 6360 B3 EG boundary conditions cache usage centrifugal force 105 chem dat chemical composition 114 chemical reaction network CINES CO5BOLD Compaq 195 compilation compiler alpha Cray 895 gfortran Hewlett Packard Hitachi SR8000 IBM Intel NEC SX 5 SX 6 SX 8 PathScale PGI SGI UKAFF Sun compiler macro category 40 gasinter_101 199 gasinter_102 IDF MSrad_raytas opta_switch_101 45 rhd_shortrad_lambda_101 rhd_bound_t01 46 rhd_box_arrays01 42 rhd_box_bmag01 rhd_box_grav01 rhd_box_quc01 rhd_hyd_entropyfix_p01 46 rhd_hyd_gravcorr_p01 rhd_hyd_roe1d_101 rhd_hyd_upwind_p01 46 rhd_r01 17 rhd_r02 rhd_r03 rhd_rad3d_dir_t01 49 rhd_rad3d_fromray_101 rhd_rad3d_r02 rhd_rad3d_solve_t01 49 rhd_rad3d_step_t01 49 rhd_rad3d_toray_101 rhd_roeid_flux_101 46 rhd_roeld_flux_t01 7 rhd_roe1d_
37. F9ODUST 22 264 5 muss 4 3 1 14 F9O_MHD 4 3 1 15 FOO_ TWEAK 4 3 1 16 F90 MACHINE 11 13 15 17 19 19 20 23 23 23 24 24 28 29 29 30 32 32 CONTENTS 4 3 1 17 F90 BASEPATH 40 Compiler macros ns ae bok ata mate BE Be HA ek ak Bk mk Bae 40 4 4 1 General y k ato kee ee AR a ee 41 4 4 1 1 timing c tactor e nr a Ee ee a a 41 eee tet Giel eid we EEN Soe es bg Be de etn de 41 4 4 1 3 OMETA 25 nae ao e A ee 42 4 4 1 4 rhd_box_arraysOl o ee 42 4 4 1 5 rhd box grav0l 42 4 4 1 6 rad bOx qucOl ly a ss a ar as a dik a sta e ae 42 4 4 1 7 rhd box bmagOli wo tn oer ae ia a e YO er 43 4 4 2 Input output with UIO lassen oew tende Bee eee 43 4 4 2 1 ulo_switch_system_l01 43 4 4 2 2 uio switch native l0 aoaaa aa a 43 4 4 2 3 uio switch ieeebe OL ooa aaa e 44 4 4 2 4 uio switch ieeele 101 44 4 4 2 5 uio_switchieeel0l 2 2 0 0 0 02 0 ee ee 44 4 4 2 6 ulo_switch_crayxMpl0l 44 4 4 2 7 uio swith open JOL ze ocre a a a e 44 4 4 3 Equation of state 2 4 5 ee be eRe dE a ee 45 4 4 3 1 Easier JOL as sa ee ee be Dk Se GS Ae ee eee 45 4 4 3 2 gasinter 1021 es see a ek eee Ae ee we he 45 4 4 4 Opacity e ee Ga o ea ee eee ee we aoa ta 45 4 4 4 1 opta switch 101 45 4 4 5 Hydrodynamics Roe Solver seas sera A ee ee 45 4 4 5 1 thd hyd gravcorr pOL Ji aans e a e 45 4 4 5
38. For accessing data in UIO format within IDL the initialization routine uio_init see Sect 6 2 7 1 and the high level reading routines uio_struct_rd pro uio_dataset_rd pro and uio_datasetlist_rd pro see Sect 6 2 7 3 might suffice 6 2 7 1 Initialization of UIO routines under IDL The directory containing the IDL UIO routines should be added to the IDL variable PATH This could be done by a program segment in the startup procedure like 3 Try to determine language if n_elements X TICKV eq 150 then langua WAVE else langua IDL 6 2 UIO DATA FORMAT 97 Add user IDL directory to search path if langua eq IDL then begin amp addpath expand_path UIOPATH idl amp endif else begin amp addpath home supas024 uio idl home supas024 wave amp endelse if strtrim addpath 2 ne then path addpath path delvar addpath Alternatively one might want to set the IDL path variable accordingly like export IDL_PATH UIOPATH id1 for example in the bashrc file Or one just copies or links the UIO IDL routines to a location in the standard IDL search path It is reasonable to include the UIO initialization in the startup procedure as e g 3 Initialize uio routines uio_init progrm by hand IDL can handle the conversion types native ieee_4 ieeele_4 ieee idl xdr compare Tab in Sect 6 2 3 1 Here ieee_4 is the default and
39. H out O data UIO HION additional output HION step H out O data UIO HION additional output Table 6 1 List of all control and data files of CO5BOLD with the file name where e g rhd and data are in most cases only placeholders for the real model or data table name a reference to a section with a more detailed description of the file a column indicating whether the file is used for input or output the type of the file distinguishing between executable control data and status files and a slightly more detailed description So far there exist three UNIX shell scripts calling Fortran routines useful to quickly examine data sets or to change the format or conversion type of files The installation of these scripts with a configure make make install sequence is described in Sect 6 2 6 1 Without these scripts an UIO file in ASCII format can be examined with any text editor or with more To get an overview about the contents of a binary file the command strings 30 uio_example_file dat can be useful 6 2 2 Example of UIO data file To give a first impression about the data structure here follows a simple test file which contains the header a label a couple of scalars an array and a short table fileform uio form formatted convert native version 0 1 1997 11 29 amp date 29 11 1997 21 23 39 835 system IRIX machine atlas osrelease 6 3 amp osversion 12161207 hardware 1P32 language Fortran90
40. Schaffenberger et al 2005 The module has the following features e Use of the HLL solver with the Janhunen source terms Janhunen 2000 o Extension to 2nd order with linear or parabolic reconstruction and a Hancock predictor step or Runge Kutta TVD timeintegration scheme 2 2 MAGNETOHYDRODYNAMICS W SCHAFFENBERGER 21 o The following limiters are available Minmod vanLeer Superbee Piecewise Parabolic PP o Hybridization of 1st and 2nd order flux to ensure positivity of pressure and density Use of Roe solver Flux interpolated constrained transport step Small violation of strict energy conservation after the constrained transport step to keep the pressure positive E term of Balsara amp Spicer 1999 Electric conductivity and additional energy diffusion Use of thermal energy equation instead of total energy equation possible for HLL solver only Use of both thermal energy equation and total energy equation possible dual energy method HLL solver only Reduction of Alfv n speed to avoid small time steps with HLL solver only and in combination with thermal energy equation or dual energy method only e Use of multiple MHD substeps Boundary conditions for the magnetic field can be specified independently from the hydro boundary conditions Diffusive boundary layers possible e Dimensional splitting or unsplit scheme possible The magnetic field is located at the cell boundaries rather than in
41. THERMODYNAMIC RELATIONS M STEFFEN AIP The adiabatic sound speed is then obtained as Third adiabatic exponent This relation is obtained by combining Eq 20 with the identity T T dT y dp 4 e de 0p de p and then using Eq 38 Adiabatic temperature gradient OInT Olm7 Olnp 3 1 Olnp Olnp Olnp ry Adiabatic energy changes since or We define the coefficients c and c through the relation ds dInp c d In p Entropy change at constant density 25 44 46 47 48 49 50 51 This relation is obtained from the equality of the mixed derivatives in Eq 20 together with Eq 44 Entropy change at constant pressure 52 This relation is obtained from the equality of the mixed derivatives in Eq 21 21 together with Eq 46 46 Specific heat at constant density 26 CHAPTER 2 EQUATIONS 53 To derive the specific heat at constant pressure we start from the relation OlnT OlnT InT l 4 d In Gr no 55 as 54 from which we get Os OlnT OlnT Cae S Os 3 8 Using Eqs 44 and 53 we obtain 56 Now 5 J ds a dinp me d In p 57 Olnp 5 Olnp s 0 al al S S np np ds Inp s amp dte 255 mz t ee 0 oe hence Os ES Os Os Ge ds 4 1 dlnp dla T 59 i Es i s Jr Olnp y Olnp A OMT aB and finally CD E a Using Eqs 27 44
42. be specified e g with character outconv_end f A80 b 80 n Output file conversion amp c0 ieee_4 ieee_8 crayxmp_8 native ieee_4 The allowed values depend on the machine Leaving this field empty means that the default is chosen that is build into the local UIO module If the type ieee_4 is supported which is always the case so far it should be chosen 7 1 21 19 character outform full The format see Sect 6 2 3 1 of the full model files can be chosen e g with character outform_full f A80 b 80 n Output file format amp c0O formatted unformatted unformatted Allowed values are e unformatted default fast compact possibly machine dependent output strongly recommended e formatted slow machine independent output big files 160 CHAPTER 7 INPUT AND CONTROL FILES 7 1 21 20 character outconv full The conversion type see Sect 6 2 3 1 of the full model files can be specified e g with character outconv_full f A80 b 80 n Output file conversion amp c0 ieee_4 ieee_8 crayxmp_8 native ieee_4 The allowed values depend on the machine Leaving this field empty means that the default is chosen that is build into the local UIO module If the type ieee_4 is supported which is always the case so far it should be chosen 7 1 21 21 character outform_mean The format see Sect 6 2 3 1 of the additional data files can be chosen e g with character outform_mean f A80 b 80 n Output file forma
43. choice between e g different loop structures or case distinctions These macros are set by the configure script to the best knowledge of the author s Ideally they should be checked and modified if necessary each time CO5BOLD is compiled on a new machine It should be save to modify these settings the results between runs with different settings should only differ slightly due to round off errors Some macros select between different numerical approximations A change here should be visible in a more or less drastic change of the results of a simulation Usually the default values should be accepted Other settings typically only exist to allow the comparison with older versions of CO5BOLD or because there are new developments going on which have not yet managed to become the default A couple of macros only activate timing measurements and result in additional output Some of them are not thread save und should only be activated for runs on one thread as done by the configure script It is always save to switch any of them off by removing or undefining them The macros in the category test mark parts of code under development The default values should only be changed with great care typically by the author of that code segment The configure script does not touch these settings 4 4 1 General 4 4 1 1 timing c factor timing count factor in timing_module F90 Category account for property of machine To produce the timing sta
44. compute nodes where the Intel libraries should be available but aren t 4 6 SPECIFIC MACHINES amp COMPILERS 63 e assume byterecl I O specify that the length of a record is measured in bytes and not in words That is necessary for the UIO routines e Duio_switch_system_101 1 Duio_switch_native_101 1 Duio_switch_ieeebe_101 1 Duio_switch_ieeele_101 1 Duio_switch_ieee_101 1 Duio_switch_open_101 1 I O activate the appropriate set of UIO switches e Dtiming_c_range 15 Dtiming_r_type 7 General configure the timing routines e r8 fpconstant General force compilation in double precision see 4 5 5 In general single precision is sufficient However e g for very cool objects with small Mach number flows the general activation of double precision arithmetic is necessary e fpp General activate the preprocessor e W0 General suppress warning messages On Macintosh machines the typical optimization flags are 03 no prec div fno alias ip A big problem is the tiny stack size on those machines large arrays taken from the stack should be avoided For the SHORTrad module this can be achieved by setting Drhd_arrays_101 2 during compilation In addition relatively small chunk sizes should be specified in rhd par see Sect 7 1 8 9 and Sect 7 1 11 17 Using the Intel compiler before version 9 1 there was a problem with the UIO modules when OpenMP is activated This was a bit weird because the UIO modul
45. different ways e tabre Read 1d array from 2d table array all types tabw Write 1d array into table all types uclose Close file with special handling for conversion type 5 uopen Open file with special handling for conversion type vnanrm Transform a string to give a correct name of a variable wf2rt Produce from write format string corresponding read format string 3 PWS Writing scalar and array data of all types X s WEELEOS Write file header wrhdme Write header of variable input term table A wrhead Write header of variable input line table wrlabl Write label wrtab Write table of integer real and or character data to file JRA I 3k k I I IOI IOI ak 1 1 1 3K 3K K aK AACA A 2 3K 1 1 1 12 aK ak CAC 3K 3K 3K 22211 AACA 3K K K K K K K EOE OK Include Files uio_ pro filedefinc uiocstinc channel status information common uio_chainf uiocvlinc convert type list of current machine common uio_cvlist uionaminc names of types keywords identifiers default formats A common uio_defnam uiosizinc length of strings size of tables trmtab lintab A uiotabinc empty table structure common uio_taborg k I k OIA 3k 3K 3K AK a K aK aK A A I I 3K 21 21 21 3K 3K K aK aK aK A ACA 3K 3K 3K 3K K K K K 2K K 2k 2K F 3K 3K 3K 2K 2K K K K K K K K 2K 2K 2K 3K OK Most of the routines are low level ones and do not have to be worried about because they rarely will be used directly
46. dtimestep_out_fine f I4 b 4 n Output time step number u 1 cO dtimestep_out_fine lt 0 gt no output 1 7 1 23 10 character outfile_fine The name of the file for the output of additional information at regular small intervals can be specified with e g character outfile_fine f A80 b 80 n Output file name rhd fine Leaving it empty means that no file of this type is written Specifying it means the same up to now 164 CHAPTER 7 INPUT AND CONTROL FILES 7 1 23 11 character outform fine The format see Sect 6 2 3 1 of the files with frequent output can be chosen e g with character outform fine f A80 b 80 n Output file format amp c0 formatted unformatted unformatted Allowed values are e unformatted default fast compact possibly machine dependent output strongly recommended e formatted slow machine independent output big files This parameter can be specified but there is no corresponding output file in CO5BOLD yet 7 1 23 12 character outconv fine The conversion type see Sect 6 2 3 1 of the files with frequent output can be specified e g with character outconv_fine f A80 b 80 n Output file conversion amp c0 ieee_4 ieee_8 crayxmp_8 native ieee_4 The allowed values depend on the machine Leaving this field empty means that the default is chosen that is build into the local UIO module If the type ieee_4 is supported which is always the case so far it should b
47. e lt 0 0 No output to this file e 0 0 Output at every time step e gt 0 0 Output to mean file approximately every dtime_out_mean seconds Because the size of one mean dataset is much smaller than one full dataset it is possible to request a higher sampling rate without using too much disk space 7 1 21 4 integer n outslicedim_mean The index of the optional slice in the mean output file can be specified with e g integer n_outslicedim_mean f 14 b 4 n index of slice in mean output file u 1 amp c0 0 no output of slice amp ci 1 2 3 output of slice with plane perpendicular to this direction 2 With a value of 0 the output is suppressed A value of 1 2 3 indiciates the direction of the normal to the output plane for instance in a local 3D box in a star model with gravity along direction 3 a value of 3 gives a horizontal plane in the middel of the model useful only in special cases whereas a value of 2 or 1 gives a vertical slice with a horizontal and the vertical axis useful for movies of 2D slices The grid index of the slice cannot be specified 7 1 21 5 integer outdim_chul The dimension of an additional output chunk 1 written into a separate file can be specified with this parameter a 2x3 integer array The output of a horizontal slice at the 20th layer from the bottom can be requested with integer outdim_chu1 d 1 2 1 3 f I5 b 4 p 6 n Chunk 1 dimension u 1 amp cO0 0 sta
48. erg g vi Velocity 1 cm s v2 Velocity 2 cm s v3 Velocity 3 cm s quc001 Number density of CO 1 cm 3 advect 1 bb1 Magnetic field 1 G bb2 Magnetic field 2 G bb3 Magnetic field 3 G It might follow ACTION Initialize MS radiation transport routines lt lt lt lt lt lt lt lt And finally ACTION Open output files lt lt lt lt lt lt lt lt which indicates that for instance the rhd full file see Sect 8 1 and the rhd mean file see Sect 8 3 have been opened and now contain a header The end of the initialization phase and the beginning of the proper simulation is marked by e g 2 2 2 St art Computation SS SS SS SS SS Time step number itime 47050 time 2 5821813E 08 t_job 8 510000E 00 The output for a typical simulation time step can look like for a supergiant model with SHORTrad radiation transport Time step number itime 49048 time 2 6822680E 08 t_job 1 272180E 06 dtime 5 3047E 03 HD 1 4838E 04 RAD 5 3047E 03 VIS 1 0723E 05 Luminosity per core volume 4 49999049E 02 HYD 1 N_cellsperchunk n_chunks 10000 1410 HYD 2 N_cellsperchunk n_chunks 10000 1410 HYD 3 N_cellsperchunk n_chunks 10000 1410 VIS3D N_cellsperchunk n_chunks 10000 1360 Start of rhd_shortrad_step n_subdtime 1 minmax T 1 111651E 03 1 630733E 05 Main 1 3 ray direction 2 0 000000 1 000000 0 000000 Main
49. for the average enthalpy plus kinetic energy flux as in CA2 for small entropy fluctuations Switch smoothly to the Normal Roe averaging for large entropy fluctuations e CA3 Take the Roe tilde average enthalpy plus kinetic energy and multiply with the computed mass flux This is a more experimental version and not generally recommended e CA4 Averaging the enthalpy and multiply with the computed mass flux This is a more experimental version and not generally recommended Here CA1 and CA2 behave in a similar way whereas CA3 and CA4 are essentially just for tests I prefer the CA1 variant for the time being However both CA1 and CA2 work only well for small fluctuations and Mach numbers Therefore one of the modified schemes should be used Again they are rather similar even if the implemented creteria are rather different While most of the versions work for ordinary main sequence models the comparably pooly resolved red supergiant models with large entropy step and Mach numbers require a combination of the criteria above Therefore CA1gMps is recommended for all type of models in general This parameter is not recognized by the MHD module 7 1 9 16 real c_hydpredfactor The hydrostatic pressure correction terms in the two acoustic waves are always present However for the entropy wave and the ionization wave it is not quite clear if the terms should be there the classical default or if they sho
50. four sides is given by e g character side_bound f A80 b 80 n side boundary conditions amp c0 closed transmitting periodic transmitting Possible values are e reflective closed wall no gravity no radiation The velocity vector is mirrored at the boundary e constant open boundary with constant extrapolation of all values no gravity no radiation e closed closedtop closed wall can handle gravity open for outward radiation 106 CHAPTER 7 INPUT AND CONTROL FILES e periodic periodic boundaries for hydrodynamics radiation e transmitting transmitting boundary for hydro and outward radiation Any of these values can be specified But in fact not all of them are recognized by all modules Therefore some parameters are for test purposes e g shock calculations only In simulations of a solar like star with the MSrad radiation transport module the side boundaries have to be periodic In simulations of a red supergiant all boundaries including the sides will typically be transmitting As an alternative closed boundaries can be chosen in this case 7 1 4 2 character top bound The boundary condition at the top of the model is given by for instance character top_bound f A80 b 80 n top boundary conditions transmitting Possible values are e reflective closed wall no gravity no radiation The velocity vector is mirrored at the boundary e constant open boundary with constant extrapolation of all values
51. gives a list of the parameters and the modules they apply to The standard routines are now in the MSrad module for local models and the SHORTrad module for global star in a box models The LHDrad module is not maintained very much anymore 7 1 16 1 character radscheme So far there exist three different radiation transport modules The active on can be selected e g with character radscheme f A80 b 80 n Radiation transport scheme amp cO LHDrad MSrad SHORTrad amp ci None skip radiation transport step entirely SHORTrad Possible values are e None Skip radiation transport entirely 144 CHAPTER 7 INPUT AND CONTROL FILES Parameter Section LHDrad MSrad SHORTrad x radscheme opafile opapath n_radband n_radminiter n_raditer n_radmaxiter radraybase radraystar c_tminlimit c_radimplicitmu c_raditereps c_raditerstep n_radtheta n_radphi n_radsubray n_radthickpoint n_radtaurefine n_radrsyslevel n_radoutput c_radtcool c_raddcool c_radscool c_radtinci c_raddinci c_radtvisdtau c_radtvis c_radhtautop c_radcourant c_radcourantmax c_radmaxeichange C XK XA OH OH OH OH XA X XK XA XA XA k A LX XX XX XX XX X XK XA XK XX XA XX XK XX XX XX XX OH XK XA XA XA XA Table 7 2 List of radiation transport control parameters and the modules they are relevant for e LHDrad old supergiant module It uses long characteristics and is restrict
52. identifier e g box time description and additional information about array size e g d 63 63 63 63 63 63 data format e g f E13 6 p 4 b 4 and properties of the quantity e g n Density u g cm73 Each start rhd sta or final rhd end model file has a structure as shown above The rhd full file usually contains a sequence of these data sets which of course can also be used as start model of a simulation The axes xc1 xc2 and xc3 describe the positions of the cell centers The axes xb1 xb2 and xb3 contain the positions of the cell boundaries they have one element more than the corresponding cell centered quantity Cell boundaries should be centered in the middle between cell centers for the best representation of radiative fluxes with MSrad3D 8 2 Files with additional chunks of data rhd chul rhd chu2 rhd chu3 If specified the files rhd chu1 rhd chu2 and rhd chu3 contain parts of full data sets written with the same sampling rate as mean files see below The dimensions of the output blocks have to be specified in detail with outdim_chu1 etc as described in Sect 7 1 21 5 8 3 Files with averaged data rhd mean A rhd mean file contains derived data in addition to the complete data sets in rhd full files horizontal and for global models spherically averaged fluxes and other averaged quantities all 1D vectors and surf
53. included in the cleaning step Calling examples make make UIO make UIO F9OFLAGS g make clean make cleanall make remove make removeall A section of a typical Makefile using the UIO routines may be Compiler options F90C 90 F9OFLAGS Libraries UIOMAC uio_mac_module Dependencies of exe files on object files and libraries test exe test o F90C F9OFLAGS o 0 UTOPATH 90 uio_base_module o UIOPATH 90 UIOMAC o UIOPATH 90 uio_bulk_module o 92 CHAPTER 6 DATA FILE TYPES test o UIOPATH f90 UIO test f90 F90C c F9OFLAGS M UIOPATH 90 test 90 Dependencies on used modules UTOPATH 90 UI0 cd UIOPATH f90 make UIO F9OFLAGS F9OFLAGS 6 2 5 4 Sample calls of Fortran UIO routines Examples for routines with UIO input output in CO5BOLD are tabinter_rdcoeff tabinter_wrcoeff rhd_box_RdData rhd_box_WrData rhd_datx_Write and rhd_par_RdData The needed modules have to be declared by a use statement like use uio_bulk_module In the initial phase of the program the UIO routine package has to initialized by exactly one call of the uio_init routine with the name of the program as optional parameter call uio_init progrm uiotst The internal list of logical I O unit numbers may be changed with calls of uio_chunit and uio_chconv A file can be opened for writing with file test txt form formatted or un
54. it uses Constant reconstruction as fallback instead of Minmod as FRweno does This is the recommended version for red supergiant models e FRcont 2nd order continuous version of FR unstable except for low Mach numbers 7 1 PARAMETER FILE RHD PAR 119 e HBweno Common WENO scheme based on three parabolas in a stencil with an additional hand brake to fall back to a more stable monotonic scheme if the smoothness of all parabolas is bad This scheme is depending on the parameters even less diffusive than FRweno It is not strictly monotonic neither e VAweno Common vanilla WENO scheme based on three parabolas in a stencil This scheme achieves very high resolution if the lack of monotonicity and general diffusivity can be accepted It is identical to HBweno but without the handbrake and therefore even a bit faster Usually the VanLeer reconstruction has been a good choice If a more stable and diffusive scheme was needed Minmod could have been used However now the variants of the more recent 2nd order Frankenstein s Method are better choices if the additional computational cost is acceptable Even if it is not strictly monotonic the FRweno2 scheme seems to be a good general default for pure HD models computed with the Roe solver The PP reconstruction gives the highest accuracy However there is the possibility that it produces somewhat noisy models with small wiggles e g in the velocity for extr
55. kkk MODULES rhd_hyd_module Hydrodynamics routines Nok ok ok ok ok ak ok ok ok of ok ak ok ok ok ak ok ak ok ak ak ak ok ok ok ak ak ak ok ak of ok ok ak ak ok ak ok ok ok ak ak ak ok ok ok ok ok ak ak ok ak ak of ok ok ak ak ak ok ok ok ok ak ak ok ok a ok ok ok ak ak ak ok a of ok ak ak ak ok ak ok a ak ak ak ak ak a ok ok ok ak ak ok ok 2 oke Dates should be written in the form YYYY MM DD The date in the header should be updated each time a file is edited The banner at the top can be generated e g with the ASCII Generator Font banner Width 100 Usually a file contains one module with more detailed information in its respective header 5 4 2 Header of modules The header of a module could look like Fo RK module rhd_hyd_module rhd_hyd_module rhd_hydrodynamics_module PURPOSE Provide hydrodynamics routines for rhd CATEGORY Hydrodynamics CALLING SEQUENCE use rhd_hyd_module TYPES None VARIABLES None ROUTINES all contained routines public ones are marked with IS 76 gt rhd_hyd_SwitchInfo rhd_bound_3DTransmit rhd_bound_3DIn0utFlow rhd_bound_3DCenter rhd_bound_1DTransmit rhd_hyd_RoeiDoutput rhd_hyd_sDiff rhd_hyd_FluxState rhd_hyd_Pred rhd_hyd_RoeWavealphai2 rhd_hyd_RoeWavealpha36 rhd_hyd_RoeWavealpha45 rhd_hyd_Fluxrhoei rhd_h
56. model is adjusted with a rate given e g by real c_tchange f E15 8 b 4 amp n Rate of temperature change for open upper boundary u 1 0 3 7 1 4 17 real c_tsurf In the case of a transmitting upper or outer boundary the temperature of the material streaming into the model is adjusted towards a temperature teff c_tsurf This temperature can be specified as fraction of the effective temperature e g with real c_tsurf f E15 8 b 4 n Temperature factor for open upper boundary u 1 0 62 The value depends on where the outer boundary is located relative to the photosphere If the boundary lies at a point where the solar photospheric minimum temperature is located it can be fairly small If the boundary is far away from the photosphere of a red supergiant the value can be even smaller On the other hand if the boundary lies somewhere within the solar chromosphere even values above 1 0 might be reasonable 7 1 4 18 real c_hptopfactor In the case of a transmitting upper or outer boundary the density stratification outside the model has to be extrapolated properly Assumptions about this density affects the amount of mass flowing into the model For the extrapolation it is assumed that the density scale H scales with the pressure scale height H as H Hp c_hptopfactor real c_hptopfactor f E15 8 b 4 amp n Correction factor for surface pressure scale height u 1 0 8 Possible values are e C lt 0 0 No effect actually a val
57. must be set to 1 0 in order to activate advection of particle densities for the CHEM chemreacnet and the HION hiontd module The default value is 0 0 i e advection is switched off 7 1 12 4 character chem_reacfile The name of the input file containing the chemical reaction network character chem_reacfile f A80 b 80 n file name of reaction table chem dat 7 1 12 5 character chem_reacpath The path of the input file containing the chemical reaction network character chem_reacpath f A80 b 80 n path of reaction table data sven cobold dat chem 7 1 12 6 real chem_abumetal Abundance of the representative metal M if present relative to hydrogen eu M H A value of 1 0E 04 means there are 10 hydrogen atoms for every metal atom The metal number density for each grid cell is then derived via ny em p my assuming a pure hydrogen gas This parameter is ignored when a quc array for the metal is found in the input model real chem_abumetal f E15 8 b 4 n Chemical abundance of repres metal 1 0E 04 7 1 PARAMETER FILE RHD PAR 139 7 1 12 7 character hion_datapath The path of all input files for HION character hion_datapath f A80 b 80 n HION data path data sven cobold dat hion 7 1 12 8 character hion atomfile The file name of the model atom for HION character hion atomfile f A80 b 80 n HION atom file name H_6 atom 7 1 12 9 character hion abufile The name of the HION inpu
58. no gravity no radiation e closed closedtop closed wall can handle gravity open for outward radiation e periodic periodic boundaries for hydrodynamics e transmitting transmitting boundary for hydro and outward radiation exponential decrease of density standard open boundary condition e transmitting2 transmitting boundary for hydro and outward radiation exponential decrease of density and extra velocity treatment e transmitting3 transmitting boundary for hydro and outward radiation constant density extrap olation In almost every simulation of stellar convection a transmitting top boundary will be selected the closed one is an alternative The periodic condition is only recognized by the hydrodynamics routines and not by any radiation transport routine 7 1 4 3 character bottom bound The boundary condition at the bottom of the model is given for instance by character bottom_bound f A80 b 80 n bottom boundary conditions amp cO closedbottom transmitting Possible values are e reflective closed wall no gravity no radiation The velocity vector is mirrored at the boundary e constant open boundary with constant extrapolation of all values no gravity no radiation e closed closedtop closed wall can handle gravity open for outward radiation e closedbottom closed wall handles gravity radiation in diffusion approximation e closedbottom2 closed wall handles gravity radiation in diffusion approximation
59. orientation of the base axis system can be selected e g with character radraybase f A80 b 80 n Base axis system amp cO SHORTrad unity random randomcube randomgroup alternate c1 MSrad lobatto dblgaus random Allowed values for radscheme SHORTrad are e unity default During all time steps and radiative sub steps the direction of the rays stays the same e random At each time step and radiative sub step a new base axis system is chosen at random e randomcube The distribution of the random angles is tuned to optimize the isotropy of the time averaged radiation field Use together with radraystar cube e randomgroup At each new time step a new base axis system is chosen at random It is kept for all radiative sub steps e alternate Alternate between unity and random orientation matrix e drift01 Slow drift algorithm 1 e drift02 Slow drift algorithm 2 Because typically only a relatively small number of rays is chosen per time step with radraystar it is advisable to vary the directions of the rays by choosing radraybase random or randomgroup to cover the entire sphere at least over a longer time Allowed values for radscheme MSrad are e lobatto e dblgaus 7 1 16 7 character radraystar Using the modules LHDrad or SHORTrad the list of ray directions i e the number of rays and their coordinates relative to the base axis system can be specified with e g character radraystar f A80 b 8
60. output or writes it into a file In the latter case the format change from formatted to unformatted or vice versa is possible OPTIONS SG Conversion type native ieee_4 machine dependent its specification is only relevant if an output file is specified with the o option and output format unformatted f Output format formatted or unformatted Its specification is only relevant if an output file is specified with the o option h Help print usage of uiocat 1 List of entries to be copied E g uiocat 1 real rho uiocat 1 real rho integer i 6 2 UIO DATA FORMAT 95 uiocat 1 label real rho integer i uiocat 1 label real rho i Here copylist is a list separated by Each item consists of exactly two items separated by a blank No additional blanks are allowed Use copylist with as above 0 Output file name If omitted standard output is used and c and f are meaningless SunOS 5 5 1 Last change 12 January 1998 1 6 2 6 4 Information about conversion types uioinfo The shell script uioinfo calls the Fortran program uioinf f90 The man page uioinfo 1V Misc Reference Manual Pages uioinfo 1V NAME uioinfo print machine dependent information SYNOPSIS uioinfo DESCRIPTION The routine uioinfo prints information about its environment and a list of possible conversion types OPTIONS Sun0S 5 5 1 Last change 12 January 1998 1
61. pair c_hydsoundcourant c_hydsoundcourantmax works together in a the same way as described above for c_courant c_courantmax 7 1 20 11 real c hydexpcourant In addition to the usual Courant condition one could restrict the maximum expansion between two adjacent grid cells with e g real c_hydexpcourant f E15 8 b 4 n HD expansion Courant factor u 1 amp cO range 0 0 lt C_hydExpCourant lt C_hydExpCourantmax typically 0 3 0 2 7 1 20 12 real c_hydexpcourantmax This parameter can be set e g with real c_hydexpcourantmax f E15 8 b 4 n HD max expansion Courant factor u 1 amp cO range 0 0 lt C_hydExpCourant lt C_hydExpCourantmax typically 0 5 0 3 The pair c_hydexpcourant c_hydexpcourantmax works analogously to the pair c_courant c_courantmax 7 1 PARAMETER FILE RHD PAR 155 7 1 20 13 real c_radcourant The radiation transport routines are subject so time step restrictions too And in typical scenarios its the radiative timescale are the shortest one and poses the tightest restriction Contrary to the hydrodynamics routines the timescale relevant for the stability of the radiation transport scheme can only be estimated using the characteristic timescale of a small sinusoidal temperature disturbance with a wavelength of the grid size in a homogeneous background and grey radiative energy exchange The radiative Courant factor can be set e g with real c_radcourant f E15 8 b 4 n RAD Courant f
62. precision except for certain routines in e g MSrad or some dust modules To switch to double precision everywhere one has to deal with the binary files and force the transfor mation of single precision variables to double precision during the compilation Compiling all CO5BOLD files with such a switch produces problems with the UIO modules there would be a name conflict be tween the routines that usually deal with double precision reals and those that are written to deal with single precision reals and are now forced to pretend to be also a double precision version Therefore one should compile the UIO routines and the rest with separate settings e g for the Intel compiler configure make UIO export F90_PREFLAGS r8 fpconstant configure make Code compiled in this way cannot read anymore single precision binary UIO files However there are no problems with the opacity tables ASCII files and formatted UIO files To make existing single precision binary UIO files readable one could transform them to the formatted version with uiocat see 6 2 6 3 e g like uiocat f formatted o rhd_ascii sta rhd_binary sta New start models could be written in double precision binary UIO format directly using the double_flag in the IDL routine rhd_wrboxdata pro For the EOS table eos_mm00_15 eos there exists a double precision binary version 4 6 Specific machines amp compilers A slightly outdated overview about comparable sw
63. program uiotst label testdata n sample test data field date 29 11 1997 21 23 39 835 6 2 UIO DATA FORMAT 85 integer ia f 13 b 4 n This is the answer 42 complex ca f E13 6 E13 6 b 8 n This is a complex answer 0 400000E 01 0 200000E 01 real da f E23 15 b 8 n precise answer 0 420000000000000E 02 real answer f F4 0 b 4 n answer u 1 42 real real2d d 100 103 200 204 f E13 6 p 4 b 4 0 100000E 01 0 200000E 01 0 300000E 01 0 400000E 01 0 500000E 01 0 600000E 01 0 700000E 01 0 800000E 01 0 900000E 01 0 100000E 02 0 110000E 02 0 120000E 02 0 130000E 02 0 140000E 02 0 150000E 02 0 160000E 02 0 170000E 02 0 180000E 02 0 190000E 02 0 200000E 02 table f77table d 1 5 1 7 f 1X b 1 n test table to test the table routines integer inti f I5 b 4 n Integer 1 column real reali f F5 1 b 4 n Real 2 column character char1i f A16 b 16 n Char 3 column real real2 f E13 6 b 4 n Real 4 column integer int2 f 15 b 4 n Integer 5 column inti reall chart real2 int2 1 2 0 a 0 100000E 02 al 2 4 0 ab 0 200000E 02 2 3 6 0 abc 0 300000E 02 3 4 8 0 abcd 0 400000E 02 4 5 10 0 abcde 0 500000E 02 5 6 12 0 abcdef 0 600000E 02 6 7 14 0 abcdefg 0 700000E 02 ig 6 2 3 Structure of UIO files 6 2 3 1 Data representation ASCII or binary While opening a file for writing the file format formatted or unformatted and the con
64. real c_tminlimit f E15 8 b 4 amp n Enforced minimum temperature for radiation transport step u K amp c0O lt 0 0 off default 500 0 reasonable value 400 0 7 1 16 9 real c_radimplicitmu So far only the LHDrad and the SHORTrad module support implicit radiation transport It can be activated with the parameter real c_radimplicitmu f E15 8 b 4 amp n Implicitness parameter for radiation transport u 1 amp c0 0 0 explicit 0 5 time centered 1 0 fully implicit 0 0 Allowed values are e 0 0 Fully explicit radiation transport possible with all modules e 0 0 lt C lt 1 0 Partly implicit radiation transport e 0 5 Radiation transport time centered e 1 0 Fully implicit radiation transport Values outside this range do not have much meaning The implicit transport does not work efficiently yet It does not yield significantly larger time steps than possible with a sequence of purely explicit sub time steps Additionally it turns out that the hydrodynamics runs into trouble if a too large time step still well within the Courant condition is requested 7 1 16 10 real c_raditereps With activated implicit radiation transport LHDrad and SHORTrad modules only the requested conver gence accuracy of the iteration can be set e g with real c_raditereps f E15 8 b 4 amp n Relative accuracy for radiation iteration u 1 c0O Typical value 1 0E 03 2 0E 03 148 CHAPTER 7 INPUT AND
65. should usually be performed A way to maximize the radiative time step and therefore the performance of the entire code can be to first set real c_radmaxeichange to a proper value say 0 25 Then real c_radcourant and real c_radcourantmax are adjusted by trial and error in a way that the radiative time step is almost always restricted by the Courant condition and only sometimes in extreme cases by the maximum energy change restriction The computed output intensity should be checked for the size of its fluctuations due to a possibly too large value of c_radmaxeichange 7 1 20 16 real c_viscourant The tensor viscosity routines have their own time step restriction The recommended typical viscous time step can be set e g with real c_viscourant f E15 8 b 4 n viscous Courant factor u 1 amp c0O range 0 0 lt C_visCourant typically 0 5 1 0 better 0 25 05 As the corresponding viscous timescale is typically longer than the radiative one and even the Courant timescale from the Roe hydrodynamics routines this factor is often irrelevant The absolute upper stability limit is located at c_viscourant 2 0 Values around 0 5 to 1 0 are more typical In some extreme cases in simulations of the solar chromosphere it has turned out that an even lower value 0 2 is necessary to prevent some spikes in the neighborhood of strong colliding shocks 156 CHAPTER 7 INPUT AND CONTROL FILES 7 1 20 17 real c_viscourantmax The absolute
66. source codetself 7 1 2 Header The header of the parameter file contains information about the file format and contents The description array can be used to specify the goal of the simulation special model characteristics or important parameter changes compared to a previous or standard model The history array may contain the predecessor of the parameter file to simplify a tracing of parameter changes 7 1 2 1 fileform uio The header of the parameter file e g fileform uio form formatted convert ieee_4 date 2002 01 01 amp program by hand can be abbreviated to fileform uio form formatted convert ieee_4 which indicates that the file is in UIO form and Fortran formatted ASCII The specification of the conversion type convert ieee_4 is more relevant for unformatted files These terms should not be changed But it can be of interest to append e g the date of the last modification e g date 2002 12 24 7 1 2 2 Character file_id The file identification string character file id f A80 b 80 n File identification rhd parameter indicates the intended use of the file as parameter file for the RHD code CO5BOLD Do not edit 7 1 2 3 character description The header of the file can should contain a short description of the simulation as in e g character description d 1 4 f A80 p 1 b 80 n File description Parameter file for RHD code Full size 3D Betelgeuse model 5 M_Sun 650 R_
67. specified with e g real c_dust06 f E15 8 b 4 n Sticking coefficient u 1 amp cO0 For C rich dust 0 37 can be between O and 1 1 0 Typical values are between 0 0 deactivating this process and 1 0 The default value is 0 0 The standard choice is 1 0 7 1 15 8 real c_dust07 The sticking coefficient for the coagulation rate is specified with e g real c_dust07 f E15 8 b 4 n Sticking coefficient for coagulation u 1 amp c0O Typically between O and 1 20 Typical values are between 0 0 deactivating this process and 1 0 The default value is 0 0 7 1 15 9 real c_dust08 The sticking coefficient for the coalescence rate is specified with e g real c_dust08 f E15 8 b 4 n Sticking coefficient for coalescence u 1 amp c0 Typically between O and 1 1 0 Typical values are between 0 0 deactivating this process and 1 0 The default value is 0 0 7 1 15 10 real c_dust09 The sticking coefficient for the nucleation rate is specified with e g real c_dust09 f E15 8 b 4 n Sticking coefficient for nucleation u 1 amp cO Typically between O and 1 1 0 Typical values are between 0 0 deactivating this process and 1 0 The default value is 0 0 The standard choice is 1 0 7 1 16 Radiation transport control general In this part of the parameter file the radiation transport module has to be selected Depending on this selection a couple of additional parameters have to be specified Table
68. system that wrote the file How Fortran gets this information depends on the machine Values e 0 Read information from file uioenvfile txt Don t write or delete the file e 1 Call external function system to produce the file uioenvfile txt Read and delete the file default e 2 Call routine system to produce uioenvfile txt Read and delete the file 3 Call external routine HF_SH to produce uioenvfile txt Read and delete it e 4 Call external function uname to get system information e 5 Call external routine pxfuname to get system information 4 4 2 2 uio switch native 101 uio switch native list 01 in uio_mac_module F90 Category I O account for property of machine All machines can read and write their native format only that it might differ from one machine to the other It is there if needed but should be avoided in practise Values e 1 Get information about word lengths from uio_deform default e 0 2 Set word lengths explicitly 44 CHAPTER 4 COMPILATION amp INSTALLATION 4 4 2 3 uio switch _ieeebe 101 uio switch ieee big endian list O1 in uio_mac_module F90 Category I O account for property of machine This is the standard for files read of written by CO5BOLD All machine compiler combinations should support it either natively or via some conversion process Values e 0 Don t include this conversion type default e 1 Get information about word length
69. then if model ni model m1 then The use of possibly redundant brackets is encouraged as in if parkOutFile full or par DutFile_mean then if par A hdScheme hdScheme_RoeWave or amp par A hdScheme hdScheme_RoeState or amp par AkhdScheme hdScheme_RoeMagKin then if ierr gt 0 and ierr lt 100 then There is no space between subroutine of function name and following open bracket 74 CHAPTER 5 PROGRAMMER S GUIDE 5 3 Naming conventions 5 3 1 File names Most of the file names of the CO5BOLD tar ball are shown in Tables and 3 3 Available tweak and scaling files are listed in Tab The few corresponding unit test files are listed in Tab Program file names are short without hyphen rhd F90 rhdmpi F90 rhdut F90 However to avoid name space pollution very short names for subroutines functions modules and their correspond ing files are strongly discouraged Instead one level of grouping as e g subroutine timing_start and subroutine timing_stop in timing_module or two levels as e g subroutine rhd_hyd_Step in rhd_hyd_module are recommended In these cases the files are named as the modules they contain i e timing_module F90 and rhd_hyd_module F90 respectively As Fortran free format is preferred the normal file suffix is 90 or F90 for files that have to be processed with a preprocessor during the compiling step even if language elements beyon
70. to book sections become chapters 2013 09 23 Reorganization and renaming of sections 2013 09 24 Source code files sorted into groups 2013 09 27 New short subsections about vectorization 4 5 2 and cache usage 4 5 3 2014 02 24 Change of default values of some compiler switches 2014 06 20 New option randomcube for parameter radraybase parameter C_radHtauTop also in handled in SHORTrad new option core_energyentropy1 for parameter heat_mode new parameter hdCoreHeatProfile new Radial and Meridional options for hdCoreDragProfile new parameters s_InFlRadGrad and s_InFlLatGrad color output of configure script 6 2014 07 18 New parameter C_gravmu 2014 09 03 New reconstruction methods HBweno VAweno 2015 04 20 First draft of Programmer s guide 2015 04 21 New parameters C_hydLowMachcsBase C_hydSmallFluctFactor N_hydRKIter 2015 05 06 New parameters C_hydCellsPerChunk2 and C_hydCellsPerChunk3 hdTmpStructKeepMode N_visIter Removed parameters C_ReconstructiondTimeFactor C_visNeui C_visNeu2 C_visDrag 2015 05 07 New parameters time_ScaleStart and time_ScaleEnd 7 1 22 1 C_recWenoWeightCenter C_recWenoWeightRight and C_recWenoPsiFactor 7 1 9 10 2015 05 09 Updated Intel compiler section 4 6 8 New option F90_OPTIMIZE for configure script 4 3 1 7 Chapter 12 Glossary e CAT CO5BOLD Analysis Tool e CO5BOLD or COBOLD is the short form of COnservative COde for
71. to keep the total energy conserved Because this correction can lead to negative pressure it is omitted if the internal energy would become too small Therefore the total energy is not exactly conserved but this affects only a few cells in the simulation box See also Balsara amp Spicer on this topic The methods described above result in a very robust scheme which guarantees positivity of pressure and density under almost all conditions However this does not mean that these values are accurate The pressure and temperature distribution may be very inaccurate in regions with strong magnetic fields This may be relevant if one includes special chromospheric physics such as dynamic hydrogen ionization and CO formation in the simulation A possibility to get more accurate pressure and temperature would consist in the use of the entropy equation instead of the energy equation for the computation of the internal energy in regions with strong magnetic field This was included in the original test version of the MHD module In the present version we mak use of the equation for the thermal energy itself depending on the ratio of thermal to magnetic pressure i e the plasma 3 The limiting 8 can be specified by the model parameter beta_inv This is the dual energy approach used in many MHD codes Its advantage goes at the expense of violation of strict conservation of the total energy Due to the Courant condition the time step in case of MHD can be
72. u K texa T_ eff 5780 0 table atmosphere d 1 7 1 29 f X b 1 n Holweger Mueller Atmosphere amp cO Hartmut Holweger amp Edith Mueller 1974 Solar Physics 39 19 30 table II c1 Teff Sun 5780K real tauross f E9 2 b 4 n optical depth Rosseland u 1 real tau5000 f F7 3 b 4 n optical depth lambda5000 u 1 t log10 real t f F7 0 b 4 n temperature u K real pgas f F6 3 b 4 n gas pressure u dyn cm 2 real pel f F6 3 b 4 n electron pressure u dyn cm 2 real vmicro f F4 2 b 4 n microturbulence u km s real q f F8 5 b 4 n Hopf function u 1 c0 q T tau Teff 4 0 75 tau tauross tau5000 t pgas pel vmic q 2 00E 07 6 539 3900 0 769 3 140 0 00 0 27637 2 50E 07 6 279 3920 1 171 2 752 0 00 0 238208 5 00E 07 5 868 3970 1 598 2 342 0 00 0 29675 1 00E 06 5 588 4030 1 842 2 105 0 00 0 31510 2 00E 06 5 334 4080 2 042 1 910 0 00 0 33103 5 00E 06 5 001 4160 2 279 1 674 0 00 0 35776 1 00E 05 4 747 4210 2 450 1 508 0 00 0 37527 2 00E 05 4 486 4270 2 618 1 341 0 00 0 39712 5 00E 05 4 131 4340 2 835 1 128 0 00 0 42377 1 00E 04 3 856 4400 2 999 0 967 0 50 0 44765 2 00E 04 3 577 4460 3 162 0 804 0 50 0 47248 5 00E 04 3 200 4530 3 377 0 596 0 50 0 50256 1 00E 03 2 912 4590 3 541 0 437 0 50 0 52925 2 00E 03 2 621 4640 3 704 0 279 0 50 0 55173 5 00E 03 2 233 4720 3 919 0 070 0 50 0 58792 1 00E 02 1 939 4800 4 083 0 094 0 50 0 62415 2 00E 02 1 645 4900 4 24
73. upper limit for the viscous time scale can be set with real c_viscourantmax f E15 8 b 4 n maximum viscous Courant factor u 1 amp cO range C_visCourant lt C_visCourantmax typically smaller than 2 0 10 Its value should be slightly above c_viscourant and below 2 0 7 1 21 Input output control With this group of parameters the start model and the type and amount of output can be specified Parameters with the suffix _start describe the initial model these with suffix _end the corresponding final model Additional data can be written into the file described by the parameters with suffix _ful1 full 2D 3D model dumps huge see Sect 8 1 or into the file described by the parameters with suffix _mean additional information see be 7 1 21 1 real dtime_out_full The interval between datasets in the full file can be set e g with real dtime_out_full f E15 8 b 4 n Output time step u s amp cO dtime_out_full lt 0 0 gt no output amp ci dtime_out_full 0 0 gt output every time step 2 0E 06 Allowed values are e lt 0 0 No output to this file e 0 0 Output at every time step Attention This can produce HUGE files in no time e gt 0 0 Output to full file approximately every dtime_out_full seconds Some examples The classical value for this output for simulations of solar granulation is 20 sec To save memory this can be increased to 30sec But in this case chromosphe
74. value to zero switches off gravity 104 CHAPTER 7 INPUT AND CONTROL FILES 7 1 3 4 real mass star In the case of a central the mass in cgs units of the star has to be specified with real mass _star f E15 8 b 4 n Stellar Mass u g 9 94500e 33 7 1 3 5 real r0_grav To avoid the central singularity in a 1 r potential it is smoothed in the center to give a central potential of 1 r0_grav specified with real r0_grav f E15 8 b 4 n Inner Smoothing Radius u cm 9 45833e 12 This parameter should always be non zero for a central potential of a global model For local models this parameter specifies the depth of the lower heating and damping region see Sect 7 1 4 4 7 1 3 6 real rl_grav The density in an atmosphere in hydrostatic equilibrium can decline to very low values To artificially enlarge the pressure and density scale height in the outer layers of the star the corners of the box the gravity can be reduced by defining the potential at infinity to be 1 r1_grav specified with real ri_grav f E15 8 b 4 n Outer Smoothing Radius u cm amp c0O 0 0 Not used 11 35000e 13 Setting this parameter to zero gives the usual 1 r behavior of the potential in the outer layers but also chooses another smoothing formula in the central part where r0_grav is relevant But a value somewhat larger than the remotest corner of the box effectively cancels this artificial smoothing in the outer layers 7 1 3 7 real r2 gra
75. 0 00 PBS 1 nodes 1 ppn 4 Job file for the execution of CO5BOLD 9 2 USING A BATCH SYSTEM Source rhdi job original from HGL Last modification 2014 06 23 gt BASEDIR users bf dat job j1 STADIR BASEDIR sta Start directory contains par rhdi cmd rhd1 job WRKDIR BASEDIR wrk Work directory BAKDIR BASEDIR bak Backup and output directory RHDEXE STADIR rhd exe RHD program to be executed ulimit s unlimited export OMP_NUM_THREADS 4 export OMP_STACKSIZE 300M Jump into work directory cd WRKDIR tt Loop execute RHD code possibly several times in one job for IRUN in 1 2 do echo echo CO5BOLD Run IRUN date Clear up work directory rm A EEEH EAE AEE E EHE E EHE HEE H E HERTS EA E TE E TEHE RE EE EE E E EEE E A E EE ITE RE EEE TE HEE REE E EE E EHE EEEE H Get old command file select actual command line and read variables from command line cp p STADIR rhd1 cmd rhd1 cmd awk a 4 print next print next 4 print next DONE T print gt cmdline printf 77s n 0 DONE T next print rhdi cmd cat gt dummy_nrhd cmd read INFILE OUTFILE PARFILE ACT lt cmdline mv dummy_nrhd cmd OUTFILE _nrhd cmd echo INFILE echo OUTFILE echo PARFILE echo ACT AAEE EAE EE TE TE TE E E E H E E EAE EAE A AEE AE RRR HHH RR RRR AHH
76. 0 n List of relative ray directions amp c0 x1 1 x2 1 x3 1 oktaeder 3 tetraeder 4 cube 4 c1 ikosaeder 6 dodekaeder 10 oktaeder Examples for allowed values are e x1 N 1 one single ray along x1 axis not enough to specify fluxes in all directions e x2 N 1 one single ray along x2 axis not enough to specify fluxes in all directions e x3 N 1 one single ray along x3 axis not enough to specify fluxes in all directions e oktaeder N 3 default octahedron e tetraeder N 4 tetrahedron e cube N 4 e ikosaeder N 6 icosahedron e dodekaeder N 10 dodecahedron 7 1 PARAMETER FILE RHD PAR 147 e list 01 list 01 3 Choose ray systems from a list oktahedrons tetrahedrons If character radraybase is set to unity the rays will only be aligned to the axes or diagonals and thus avoid the time consuming interpolation step of the short characteristics method Several other choices are possible which are meant for test purposes only Choosing one of the five Platonic solids Oops German Greek names only so far means that the 3 to 10 rays are equally distributed over the solid angle from the center to each corner of the respective solid Check the complete list of options in subroutine rhd_rad3d_RaySystem 7 1 16 8 real c_tminlimit A minimum temperature can be set that is enforced by the radiation transport modules MSrad3D and SHORTrad by adding energy to the too cool cells e g with
77. 01 f E15 8 b 4 n Density of grain material u g cm 3 3 3E 00 7 1 PARAMETER FILE RHD PAR 141 7 1 14 4 real c_dust02 The atomic weight of the dust monomer is specified with e g real c_dust02 f E15 8 b 4 n Atomic weight of dust monomer u u 140 71 The value 140 71 should be appropriate for forsterite Mg25104 The unit is the atomic mass unit The default value is 0 0 7 1 14 5 real c_dust03 The number fraction of the rarest component is specified with e g real c_dust03 f E15 8 b 4 n Number fraction of rarest component u 1 amp cO For Mg25i04 Mg is the rarest its fraction is 3 1187E 05 cl Mg2Si04 contains 2 Mg gt 1 2 gt 1 55935e 05 1 55935e 05 For Mg25iO4 the rarest component is usually Mg2 So half the magnesium abundance is required as value The default value is 0 0 7 1 14 6 real c_dust04 The lower dust limit fraction is specified with e g real c_dust04 f E15 8 b 4 n Lower dust limit fraction u 1 1 0E 10 It is used in the calculation of the settling velocity where a division by the total density of monomers and dust is required To prevent this denominator to become zero a term Cqustos p is added The default value is 0 0 7 1 14 7 real c_dust05 The minimum number of monomers during condensation is specified with e g real c_dust05 f E15 8 b 4 n Minimum number of monomers during condensation u 1 10 0 For very small grains just one or very fe
78. 05 Typical choices are e 0 0 No attempt is made to make the reconstruction more continuous The original reconstruction is used e 0 01 Make the transition to a smoother reconstruction steeper at even lower Mach numbers e 0 1 Reasonable value e 1 0 Make the transition to a smoother reconstruction smoother While the resulting scheme works for solar simulations the parameters are really of benefit only in the case of brown dwarfs or exoplanets or the deep layers of M dwarfs This parameter is not recognized by the MHD module 7 1 PARAMETER FILE RHD PAR 125 7 1 9 10 real c_recwenoweightcenter The WENO style reconstruction schemes VAweno and HBweno but not the Frankenstein versions like FRweno allow to set the basic weights for the stencil of each of the three polynomials This possibility is given mainly for development purposes Users will likely not change the default values The specifiers central and right refer to the central and right stencil for finding the value at the right side of a cell The central stencil includes the left and right neighbor cells The right stencil is shifted on point to the right The left stencil is shifted on point to the left furthest away from the right cell boundary under consideration The value for the central stencil can be set e g with real c_recwenoweightcenter f E15 8 b 4 amp n Weight of central polynomial amp cO Reasonable values 0
79. 1 13 4 real dust0lle soda Ana ee a Yoo en ae ea ee Be ee 140 7 1 14 Dust dustscheme dust_k3mon03l o 00 0000 a 140 7 1 14 1 integer n_dustgrainradius 02 0000022 eee 140 7 1 14 2 real ar_dustgrainradius 0 00 00000 eee eee 140 7 1 14 3 real e dustOllo 4 hea ee Cow dd ee we eS Yee eX 140 11144 real c_dust02 eee 141 11145 real edust erae dan a ak a at a BAR ik aa B Be a E 141 7114 6 real edusta e ores BR Boy et aa oe YG ee Gee he ee Be ec 141 7 1 14 7 Teal e dusts teus bea ie er ae Hae ba ee a a Se ee 141 7 1 14 8 real c dust06 224 4 4 aa e da Re a a a 141 7 1 15 Dust dustscheme dust bins 01l 0 eee 141 7 1 15 1 integer n_dustgrainradius 2 00005204 e 142 7 1 15 2 real ar_dustgrainradius 0 0 0000 eee eee eee 142 7 1 15 3 real c dustQl sp se cu ca cca eacad ee 142 7 1 15 4 real dUstO2 rs rr ak BO He Be a ak os a ee AR 142 7 1 15 5 real C dustOSle a is yk Ae hands ae Wk A el ee eee wae a 142 7 1 15 6 real c dust0Q4 cocina Bg eRe EER AG ee ee eee ES 142 1 1 15 7 real Gedist0Ol ico e e ee a oe e 143 7 1 15 8 real dustO 4 as Hd a ers ee Rae be ee we ee 143 1 1 15 9 real C AUSTOS ea 4 64884 sat arte e A ek eK 143 11 15 10 real e dustOl ee 143 7 1 16 Radiation transport control general 143 7 1 16 1 character radscheme 0 eee 143 7 1 16 2 integer n_radband a
80. 1 8 9 integer n_hydcellsperchunk In every directional sub step neighboring 1D columns are independent from each other They can be grouped and computed in chunks of arbitrary size The approximate number of grid cells per chunk can be specified e g with integer n_hydcellsperchunk f 19 b 4 amp n Number of cells per hydro chunk amp c0 0 gt one 2D slice at a time amp c1 1 gt minimum chunk size inefficient amp c2 1200 reasonable value amp c3 1000000000 maximum chunk size inefficient and memory intensive 1600 The exact number is determined at run time to get approximately equal sizes of the individual chunks The choice of this parameter does not affect the result of the computation but the memory usage and performance smaller and more chunks may result in an optimum cache usage and need the smallest amount of memory but result in additional overhead due to frequent subroutine calls Bigger and less chunks are to be preferred for vector machines and processors with large caches Very rough guide values may be e 1200 Intel Xeon processor e 2500 Intel Pentium III or Core 2 Duo processor e 20000 RISC processor e 100000 Vector machine Note For simulations with activated OpenMP on a parallel machine the chunk size has to be made small enough to allow at least as many chunks as processors or threads available This is particularly important for models with a small number of grid poi
81. 1 9 12 real c_recwenopsifactor This parameter represents a factor to the Pairwise Smoothness Indicator controlling the handbrake that further stabilizes HBweno compared to the standard Vanilla WENO scheme VAweno The value of the parameter can be set e g with real c_recwenopsifactor f E15 8 b 4 amp n Smoothing factor in case of bad pairwise smoothness match amp cO Reasonable values 0 0 30 0 works only with HBweno 10 0 126 CHAPTER 7 INPUT AND CONTROL FILES Typical choices are e 0 0 No additional smoothing This reduces HBweno to the faster VAweno For test purposes only e 1 0 Weak smoothing e 4 0 Reasonable value e 16 0 Strong smoothing Those values might have to be increased if c_reccontshift Sect 7 1 9 8 is used Typically c_recwenopsifactor c_recwenopsifactor c_reccontshift 7 1 9 13 character hdtransvelomode This parameter controls the treatment of advection of transverse velocities It can be set e g with character hdtransvelomode f A80 b 80 amp n Mode for transverse velocity advection amp c0 Normal default CA1 CA2 CA3 CA4 recommended CA4 The choices are e Normal Compute flux of transversal momentum with standard Roe treatment old default e CA1 Compute flux of transversal momentum with consistent advection version 1 Use mass flux and upwind density to determine flow speed Actually recompute transversal velocities e CA2 Compu
82. 119 7 1 8 6 integer n_hyditer 120 7 1 8 7 integer nLhydmaxiter 0 0 000000 ee eee eee 120 7 1 8 8 character hdtmpstructkeepmode 0 e 120 7 1 8 9 integer n_hydcellsperchunk o a 121 7 1 9 Hydrodynamics control HD only zoenen ven oe van Wedden en A a 121 7 1 9 1 integer n_hydcellsperchunk2 0 o e 121 7 1 9 2 integer n_hydcellsperchunk3 o o 121 7 1 9 3 integer N_hydrkiter eee 122 7 1 9 4 real c_hydlowmachcestactor o o e e aes 122 7 1 9 5 real c hydlowmachcsbase o 123 7 1 9 6 real c_hydsmallfluctfactor 123 7 1 9 7 real Slopered cuz dome week ee Wet ae ee le e 123 1 1 9 8 real c reccontshift o o a 124 7 1 9 9 real creccontsteepl o ee 124 7 1 9 10 real c_recwenoweightcenter o 2000002 eee 125 7 1 9 11 real c_recwenoweightright 2 0 0 0 020000222 eee 125 7 1 9 12 real c_recwenopsifactor eee 125 7 1 9 13 character hdtransvelomode o e 126 7 1 9 14 character hdentropywavemode o e 126 CONTENTS 7 1 9 15 character hdenthalpyavgmode o o e 127 7 1 9 16 real c_hydpredfactor 128 7 1 9 17 real c_hydsdiftvelo e s s mor aa ns Pe ee als OR eet 128 7 1 9 18 real c_hydvdifivelo 0 0 000002 eee eee ee 129 7 1 9 19 real e h
83. 13 6 p 4 b 4 amp n Momentum flux 33 vertical u g cm s 2 real rhoviv2_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Momentum flux 12 amp u g cm s 2 real rhoviv3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Momentum flux 13 amp u g cm s 2 real rhov2v3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Momentum flux 23 amp u g cm s 2 real fepci_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Pressure energy flux radial u erg cm 2 s real fepc3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Pressure energy flux vertical u erg cm 2 s real feipci_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Enthalpy flux radial u erg cm 2 s real feipc3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Enthalpy flux vertical u erg cm 2 s real fekci_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 Y n Kinetic energy flux radial u erg cm 2 s real fekc3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Kinetic energy flux vertical u erg cm 2 s real ferci_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Radiative energy flux radial u erg cm 2 s real ferc2_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Radiative energy flux azimuthal u erg cm 2 s real ferc3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Radiative energy flux vertical u erg cm 2 s label endbox label enddataset date 22 09 2013 23 40 08 608 8 5 HION output T
84. 3 m3 n3 do i2 m2 n2 do ii m1 n1 rho i1 i2 i3 model rho i1 i2 i3 end do ii end do i2 end do i3 Long if then else constructs can have the branching condition or an abbreviated version as comment after the endif statement as in the very short example if Copyrho_flag then rho mi n1 i2 i3 model rho mi n1 i2 1i3 endif Copyrho_flag 5 5 COMPILER SWITCHES AND DIRECTIVES 79 5 5 Compiler switches and directives 5 5 1 OpenMP CO5BOLD is parallelized with OpenMP directives They should be capitalized and indented with the surrounding code as in 0MP PARALLEL DEFAULT SHARED PRIVATE i1l i2 i3 Set bulk HD quantities to zero 0MP DO SCHEDULE RUNTIME do i3 m3 nghost3 n3 nghost3 do i2 m2 nghost2 n2 nghost2 DIR IVDEP do il mi nghosti nitnghosti box rho i1 i2 i3 0 0 boxZei i1 12 13 0 0 boxfv1 i1 12 13 0 0 box4v2 i1 12 13 0 0 box4v3 i1 12 13 0 0 end do il end do i2 end do i3 0MP END DO l 0MP END PARALLEL 5 5 2 Compiler directives Some directives are inserted into the code to improve performance They are only understood by the Intel compiler though In the following example unrolling is enforced or highly recommended by the directive do i3 m3 n3 do i2 m2 n2 do ii m1 n1 1 DIR UNROLL do j 1 1 alpha_til_1 il j i2 i3 alphaO_til_1 i1 i_up_mi il i2 i3 i1 j i2 i3 end do j end do il l do ii m1 n1 1 DIR UNROLL do j 1 1 alpha_til_2 i1 j i2
85. 36g45n22_005 mcyl head 105 you get some indentation and blank lines added fileform uio form unformatted convert ieee_4 version 0 1 2013 08 24 amp date 22 09 2013 23 39 54 402 system Linux machine c8220node84 ens lyon fr osrelease 3 2 0 3 amd64 osversion 1 SMP Mon Jul 23 02 45 17 UTC 2012 amp hardware x86_64 language Fortran90 program RHD character file_id f A8 b 8 n File identification character description d 1 1 f A14 p 2 b 14 n File description character history d 1 20 f A80 p 1 b 80 n File history character version f A80 b 80 n Program version label dataset n RHD model date 22 09 2013 23 40 08 596 character dataset_id f A10 b 10 n Type of box hierarchy real modeltime f E13 6 b 4 n time u s real modeltime_db f E23 15 b 8 n time u s 8 4 FILE WITH AZIMUTHALLY AVERAGED DATA RHD MCYL 173 integer modelitime f 110 b 4 n time step number u 1 label box date 22 09 2013 23 40 08 599 character box_id f A1 b 1 n Block identification integer dimension d 1 2 1 3 f I7 p 6 b 4 real time f E13 6 b 4 n time u s real time_db f E23 15 b 8 n time u s integer itime f 110 b 4 n time step number u 1 real xc1 d 1 128 1 1 1 1 f E13 6 p 4 b 4 amp n x1 coordinates of cell centers radius u cm ds 0 0 0 1 0 1 real xc1_volume d 1 128 1 1 1 1 f E13 6 p 4 b 4 amp n Radius coordinates of cell centers volume preserving u cm amp ds 0 0 0 1
86. 4 amp n Number of cells per viscosity chunk amp c0 0 gt old chopping amp c1 50000 reasonable value 100000 It can be adjusted to improve cache efficiency and to modify the work load distribution onto the threads in case of parallel runs with OpenMP Due to the special handling of boundary cells the overhead per call increases significantly for small chunks Typically larger chunk sizes compared the the hydrodynamics chunk sizes set with integer n_hydcellsperchunk see Sect 7 1 8 9 are adequate On the other hand they should not be too large to limit the usage of temporary memory and to allow parallelization the distribution of chunks to threads For simulations with activated OpenMP on a parallel machine the chunk size has to be made small enough to allow at least as many chunks as processors available This is particularly important for models with a small number of grid points e g 2D models An example is given for the Hitachi SR8000 in Sect 4 6 5 7 1 12 Dust molecules hydrogen ionization General CO5BOLD can handle a number of additional density arrays They can be used to describe e g the mass density of dust distribution moments or number densities of molecules These species are properly advected with the gas density There is also already a small number of dust molecule formation models available These models have to be improved in the future and the influence on the radiation field opacities ra
87. 4 8 IEEE little_endian format ieee_8 8 8 16 double precision IEEE big_endian format on some machines possible crayxmp_8 8 8 16 CRAY internal data format idl 4 4 8 IDL format but IDL also supports ieee_4 xdr 4 4 amp format possible with IDL ieee 4 limit 4 8 8 standard IEEE format gt ieee_4 ieee 7 IEEE format unknown length not recommended Table 6 2 UIO conversion types with length of integers single precision reals and double precision reals in bytes and an explanation Some attention has to be paid if weird compiler switches as e g r16 i2 are used to modify the accuracy and standard memory size of variables If an existing file is opened for reading the file format and conversion type are determined automat ically from the file if the conversion type of the data in the file is among the conversion types supported by the compiler If the file has a conversion type native but is created on a machine with different internal data representation the file header might be readable but an error will probably occur during the reading of a real variable 6 2 3 2 Data file structure The UIO routines only handle sequential files Each file consists of a list of entries The first entry describes the file format conversion type and the machine who is responsible for it The following entries contain data scalars and 1D 4D arrays of type integer real single amp double precision complex single precision cha
88. 5 0 266 0 65 0 66867 5 00E 02 1 256 5080 4 460 0 504 0 85 0 74558 1 00E 01 0 961 5260 4 622 0 705 1 00 0 81447 2 50E 01 0 571 5560 4 830 1 002 1 25 0 89163 4 00E 01 0 371 5850 4 926 1 251 1 40 0 99911 7 00E 01 0 133 6260 5 022 1 613 1 50 1 13453 1 00E 00 0 019 6570 5 070 1 879 1 60 1 22581 1 50E 00 0 191 6880 5 114 2 140 1 70 1 17659 2 00E 00 0 312 7160 5 140 2 363 1 80 1 13964 4 00E 00 0 597 7920 5 191 2 889 1 80 0 70033 6 00E 00 0 761 8250 5 213 3 092 1 80 0 46595 8 00E 00 0 877 8420 5 229 3 196 1 80 1 99552 1 00E 01 0 967 8500 5 242 3 245 1 80 3 76404 6 2 UIO DATA FORMAT 89 6 2 3 4 Recommendations for standard file structure The very first entry in an UIO file is always the fileform uio entry containing information about the file format and conversion type Afterwards entries can follow in any order But it is perhaps a good idea to start the file with three special entries file_id description history as in fileform uio form formatted convert ieee 4 character file id f A80 b 80 n File identification uio demofile character description d 1 2 f A80 p 1 b 80 n File description This is a file to demonstrate the recommended start entries for all UIO files character history d 1 1 f A80 p 1 b 80 n File history UIO demo file 22 Dec 1997 14 15 15 A recommended format for sets of multi dimensional arrays e g hydrodynamics x axis y axis z axis density velocities energy
89. 6 real c_ courant A typical Courant factor for each 1D hydrodynamics step can be specified with e g real c_courant f E15 8 b 4 n HD Courant factor u 1 amp c0O range 0 0 lt C_Courant lt 1 0 typically 0 5 05 From the minimum cell crossing time of a partial wave and this factor a recommendation for the nezt time step is computed A value of 1 0 is the very upper limit that guarantees stability for some simple linear 1D test problems Recommended upper limits for fully non linear simulations can be found in Tab Z1 7 1 20 7 real c_courantmax A typical maximum Courant factor for each 1D hydrodynamics step can be specified with e g real c_courantmax f E15 8 b 4 n maximum HD Courant factor u 1 amp c0O range C_Courant lt C_Courantmax lt 1 0 typically 0 9 0 8 154 CHAPTER 7 INPUT AND CONTROL FILES From the minimum cell crossing time of a partial wave and this factor an upper limit for the current time step is computed If this limit is exceeded the computation is interrupted and resumed with a smaller time step based on c_courant Usually this parameter should be restricted by c_courant lt c_courantmax lt 1 0 A value of 1 0 is the very upper limit that guarantees stability for some simple linear 1D test problems Recommended upper limits for fully non linear simulations can be found in Tab 7 1 7 1 20 8 real c_maxeichange The relative change in internal during a single 1D hydrodynamics
90. 7 1 1 Prepare the runtime environment That might involve depending on operating system compiler and machine commands like ulimit s unlimited to increase the overall stacksize export OMP_STACKSIZE 300M to increase the stacksize per thread for an OpenMP run export OMP_NUM_THREADS 8 to prepare an OpenMP run on 8 cores Start the simulation with nice nohup rhd exe gt rhd out amp You can see how the simulation proceeds with tail f rhd out The other data files usually are in a binary format You can check them e g with if installed see Sect 6 2 6 2 uiolook rhd mean They are usually read and analyzed with IDL routines see Sect 6 2 7 3 or processed by a spectrum synthesis code For machines with batch queue there is a script which can handle an entire sequence of simulations see Sect 9 2 179 180 CHAPTER 9 RUNNING A SIMULATION 9 2 Using a batch system For longer simulations it is inconvenient to restart the individual jobs by hand This task is done by a script originally from Hans G nter Ludwig Its basic function is sketched in Fig CO5BOLD function diagram In q Out Out Out Out Figure 9 1 Program scheme Here comes an example of the script rhd1 job for a system without dedicated batch system The submission of a job is done via nohup rhd1 job amp bin sh PBS N rhdi PBS 1 walltime 72 0
91. 8 b 4 amp n 1 beta dual energy parameter u 1 sle The criterion is as follows if 8 lt 1 beta_inv the equation for the thermal energy is used if 8 gt 1 beta_inv the equation for the total energy is used B is the plasma 9 i e the ratio of the gas pressure to the magnetic pressure If beta_inv is set to zero the thermal energy equation is used for all cells A reasonable value may be 100 0 To deactivate this feature set beta_inv to a negative value If not specified this parameter is set to 1 0 This parameter works only with hdscheme HLLMHD When va_max gt 0 then a reasonable value is given by beta_inv VA max2 Cs2 Where cs is the speed of sound in the region where 6 lt 1 beta_inv 7 1 10 10 real va max This parameter limits the Alfv n speed to va_max by an arbitrary reduction of the Lorentz force Example real va_max f E15 8 b 4 amp n maximum Alfven speed u cm s amp 1 0 This parameter is only recognized in conjunction with hdscheme HLLMHD va_max 5 0E 06 might be a reasonable value for some specific applications to the solar photosphere If not specified this parameter is set 1 0 Values lt 0 disactivate this feature See also Eq 2 19 7 1 10 11 integer n_magdiffside Increases the diffusivity of the scheme near the side boundaries within a thickness of the diffusion layer of N_magDiffSide computational cells Example integer n_magdiffside f 19 b 4 amp n Number of cells of diffusive sid
92. 90 Multidimensional Upwind Methods for Hyperbolic Conservation Laws J Comp Phys 87 171 200 link to publisher Colella P amp Woodward P R 1984 The Piecewise Parabolic Method PPM for Gas Dynamical Simulations J Comput Phys 54 174 201 link to ADS Freytag B Steffen M amp Dorch B 2002 Spots on the surface of Betelgeuse Results from new 3D stellar convection models Astron Nachr 323 213 link to ADS Freytag B amp Hofner S 2008 Three dimensional simulations of the atmosphere of an AGB star A amp A 483 571 583 link to ADS Freytag B Allard F Ludwig H G Homeier D Steffen M 2010 The role of convection overshoot and gravity waves for the transport of dust in M dwarf and brown dwarf atmospheres A amp A 513 19 link to ADS Freytag B Steffen M Ludwig H G Wedemeyer Bohm S Schaffenberger W Steiner O 2012 Simulations of stellar convection with CO5BOLD J Comput Phys Special Issue Computational Plasma Physics ed Barry Koren 231 919 959 link to ADS link to publisher Freytag B and Chiavassa A 2013 Global radiation hydrodynamics simulations of red supergiant stars EAS Publications Series eds Kervella P Le Bertre T amp Perrin G vol 60 137 144 link to ADS Freytag B 2013 Advances in the hydrodynamics solver of COSBOLD MemSAIS 24 26 link to ADS 197 198 BIBLIOGRAPHY Janhunen
93. APTER 13 TRADEMARKS Bibliography Allard F Homeier D amp Freytag B 2011 Model Atmospheres From Very Low Mass Stars to Brown Dwarfs 16th Cambridge Workshop on Cool Stars Stellar Systems and the Sun eds Johns Krull C Browning M K West A A ASPCS 448 91 link to ADS Balsara D S amp Spicer D S 1999 A Staggered Mesh Algorithm Using High Order Godunov Fluxes to Ensure Solenoidal Magnetic Fields in Magnetohydrodynamic Simulations J Comput Phys 149 270 292 link to ADS Beeck B Collet R Steffen M Asplund M Cameron R H Freytag B Hayek W Ludwig H G amp Sch ssler M 2012 Simulations of the solar near surface layers with the COSBOLD MURaM and Stagger codes A amp A 539 121 link to ADS Caffau E and Ludwig H G and Steffen M and Freytag B and Bonifacio P 2011 Solar Chemical Abundances Determined with a CO5BOLD 3D Model Atmosphere Solar Physics 268 255 269 link to ADS Chiavassa A Freytag B Masseron T amp Plez B 2011 Radiative hydrodynamics simulations of red supergiant stars IV Gray versus non gray opacities A amp A 535 22 link to ADS Chiavassa A and Freytag B and Plez B 2013 3D hydrodynamical simulations to interpret observa tions of stellar surfaces of red supergiant stars LAS Publications Series eds Kervella P Le Bertre T amp Perrin G vol 60 145 153 link to ADS Colella P 19
94. C formal exp 28014 9014 280273 0 321778 SHC formal exp expl2t 28014 3950 409912 0 141016 SHC formal dir3 36083 63222 242188 1 752134 SHC time dir3 36083 19676 009766 0 545299 SHC formal limitei 16024 1306 419922 0 081529 SHC step dtime final 16024 12730 129883 0 794441 SHC formal dir2 11959 22205 000000 1 856761 SHC time dir2 11959 5731 149902 0 479233 SHC formal diri 4044 10674 429688 2 639572 SHC time dirl 4044 1893 760010 0 468289 SHC step dtime final output 181 8620 870117 47 629116 Radiation trans output only 20 335 929993 16 796499 177 178 CHAPTER 8 OUTPUT AND STATUS FILES In this example the value for the overall time rhd code 410 830017 sec is not useful because of an overflow in the counter However it is evident that the radiation transport consumes most of the time 243729 000000 sec followd by the hydrodynamics routines 48944 660156 sec and the tensor viscosity routines 25446 400391 sec Some of these values are split further 8 7 Additional status and output files rhd done rhd snap At the beginning of every time step CO5BOLD checks in the working directory whether the file rhd dump exists If it has been generated e g with touch rhd dump and the file rhd snap does not exist the current model is written into rhd snap It has the same file properties format and conversion as the regular rhd end file The run of the simulation itself is not modified This feature might be usefu
95. CO5BOLD User Manual Bernd Freytag Matthias Steffen Sven Wedemeyer B hm Hans G nter Ludwig Jorrit Leenaarts Werner Schaffenberger May 13 2015 Contents s ist of figures ist_of tables Introduction N AB ama O Equations 2 1 Basic equations scs Soa a ee we a OR RR er ee Boe da 2 2 2 3 Magnetohydrodynamics W Schaffenberger A collection of thermodynamic relations M Steffen AIP 2 3 1 Basic thermodynamic equations 2 3 2 Definition of often used thermodynamic coefficients ecco eee 2 3 4 Derived thermodynamic coefficients 2 3 5 Ideal gas with constant specific heats polytropic gas 3 CO5BOLD file overview 3 1 Fortran directoriesl en 3 2 Fortran files 0 o 3 3 SCHPE ISS b a spats SG nt een e arki a e des 3 4 Documentation files 4 Compilation amp installation eto e anda EFE 4 3 1 Control environment variables 4 3 1 1 FIO COLOR 4 3 1 2 F90 COMPILER 4 3 1 3 F90 PREFLAGS 4 3 1 4 F90 POSTFLAGS 4 3 1 5 F9O_PARALLEL 4 3 1 6 F9O_DEBUG 4 3 1 7 F90 OPTIMIZE 4 3 1 8 F9OLHDRAD 4 3 1 9 F9O MSRAD 4 3 1 10 F9O_SHORTRAD 4 3 1 11 FOOCHEM 4 3 1 12 FOO HION 4 3 1 13
96. CONTROL FILES 7 1 16 11 real c_raditerstep With activated implicit radiation transport LHDrad and SHORTrad modules only the step size of the iteration can be restricted with e g real c_raditerstep f E15 8 b 4 amp n Step size of radiation iteration u 1 amp c0 Typical values 0 7 0 81 1 20 Allowed values are e 0 0 lt 1 0 Restricted step size e 1 0 No restriction standard step size e gt 1 0 Extra large steps This value has to be chosen carefully to get optimal performance Is the step size too small the convergence is safe but too slow A too large step size inhibits convergence and leads to a decrease in the time step which results in a bad performance too 7 1 17 Radiation transport control MSrad only 7 1 17 1 integer n_radtheta Using the MSrad module the ray directions have to specified in a different way The number of ray sets in theta direction can be chosen with e g integer n_radtheta f 14 b 4 amp n NTHETA Number of ray sets in theta direction c0 2 2 7 1 17 2 integer n_radphi Using the MSrad module the number of ray sets in phi direction can be set e g with integer n_radphi f 14 b 4 amp n NPHI Number of ray sets in phi direction c0 2 2 7 1 17 3 integer n_radsubray Using the MSrad module the number of rays per cell with the same direction can be specified e g with integer n_radsubray f I4 b 4 n KPHI Number of rays per cell c0 2 2 7 1 17 4 integer n_radthickp
97. EADME_MHD 2 2 2010 03 17 Performance enhancement for EOS gasinter_102 4 4 3 2 2010 03 19 Performance enhancement during box handling rhd_box_arrays01 4 4 1 4 2010 04 09 Transmitting upper boundary condition c_rhochangetop 7 1 4 15 Better counters for timing statisctis timing_c_ range 4 4 1 2 2010 04 11 Merging of previous introductory text to Sect 2 2 by BF with README_MHD by WS Update of various text passages Shift of parameter description to Sect 7 1 Removal of remarks relating to the magnetic field in descriptions of parameters side_bound top_bound and bottom_bound Description of boundary parameters for the magnetic field side _ bound _mag_x1 side bound _mag_x2 top_bound mag bottom _bound_mag bi_inflow C_magthetaB and C_magphiB Updates for reconstruction PP c_slopered n_hyditer n_hydmaxiter Updates and introduction of parameters for the MHD module c_resb c_resbconst c_resepsilon beta_inv va_max N_magDiffSide N_magDiffTop and n_magbiffbottonm 7 1 5 F90_MHD comment about zero magnetic fields Removal of first version for MHD entry in table of high level modules References Balsara amp Spicer 1999 Janhunen 2000 Stone amp Pringle 2001 2010 04 14 Some parameters in MHD module were renamed B_theta B_phi N_side N_top N_bottom C_magthetaB C_magphiB N_magDiffSide N_magDiffTop N_magDiffBottom 2010 04 29 The files rhd_mac_ module f90 were removed The single
98. H HARE RRR RAR RRR A REE if ACT dum then WEEER IEEE GHEHE REI EAI RHD execution Copy parameter file cp p STADIR PARFILE rhd par Copy start file if test s BAKDIR INFILE then cp p BAKDIR INFILE rhd sta else cp p STADIR INFILE rhd sta cp p rhd sta BAKDIR INFILE fi 181 182 CHAPTER 9 RUNNING A SIMULATION Copy executable cp p RHDEXE rhd exe Execute RHD rhd exe gt rhd out RHD_EXIT if RHD_EXIT 0 s rhd done then Exit status not zero error may have occurred during execution of rhd exe if RHD_ EXIT 0 then echo Non zero exit status RHD EXIT occurred during execution of RHD else echo No rhd done file found assume error during execution of RHD fi echo Execution of job chain terminated Modify nrhd cmd set termination character awk print next Nx print next A print next DONE T printf 77s n 0 DONE T next print rhdi cmd cat gt nrhd cmd tt Terminate chain by simulating ACT eoc ACT eoc else Modify command file add in appropriate column to indicate proper execution awk 4 print next print next print next DONE T print gt cmdline printf 77s n 0 DONE T next print
99. HAPTER 4 COMPILATION amp INSTALLATION 4 4 8 Obsolete macros 4 4 8 1 IDF Integer Delta Flux in rhd_hyd_module F90 Category performance enhancement Number of padding cells for flux like variables This number was introduced to check whether the increase of the size of vectors for flux like quantities defined at cell boundaries can improve the performance especially on a CRAY machine The gain is marginal if present at all The parameter is usually set to zero or left undefined Values e 0 default no padding cells e 1 2 3 extra padding cells This switch is not recognized anymore 4 4 8 2 rhd_hyd_roeld_l01 rhd hydrodynamics roe 1 dimension loop 01 in rhd_hyd_module F90 Category performance enhancement The computation of the Roe fluxes can be done by either of two sets of routines to find the set which gives optimum performance with essentially the same results Values e 0 default lots of small routines acting on scalars inlining needed cache reuse is optimized e 1 routines acting on arrays more temporary arrays necessary vectorization is easier This switch is not recognized anymore 4 4 8 3 rhd_roeld _slope_101 rhd roe 1 dimension slope loop 01 in rhd_hyd_module F90 Category feature activation When this compiler switch is set a new extra stabilization mechanism can be activated If one of the reconstruction methods VanLeer Superbee or PP see Sect 7 1 8 4 is activa
100. IDL are described See also Sect 6 2 7 10 1 Preparations Make the UIO IDL routines visible to IDL somehow There are several ways to do that Three are described below We recommend to create an initialization file e g named start pro which should be called after starting IDL e g start This is necessary to define relevant paths of IDL subroutines and to provide the UIO package Thus the file should contain the following Add user IDL directory to search path addpath expand_path UIOPATH id1 addpath addpath expand_path HOME HYDRO IDL rhdpro if strtrim addpath 2 ne then path addpatht path delvar addpath 3 Initialize uio routines uio_init progrm by hand Note Before using IDL the environment variables for the CO5BOLD paths should have been set Use setarcdeppaths sh or ksh csh for this purpose Important is UIOPATH which specifies where to find the IDL routines for the UIO handling in the script above Alternatively one might set the IDL path variable accordingly like export IDL_PATH UIOPATH id1 for example in the bashrc file before starting IDL Or you just make a symbolic link from the UIO IDL routines at their original location to a sub directory of the main IDL directory which should be in the IDL path anyway The initial single call of uio_init is necessary in any case 10 2 CO5BOLD data in IDL Important to know is t
101. In this version the extrapolation of quantities should be smoother than for closedbottom e periodic periodic boundaries for hydrodynamics 7 1 PARAMETER FILE RHD PAR 107 e transmitting transmitting boundary for hydro and outward radiation The parameters real c_tchange real c_tsurf and real c_hptopfactor have to be specified e inoutflow classical open lower boundary for deep convection gravity and radiation possible The parameters real s_inflow real c_schange and real c_pchange have to be specified e inoutflow2 variant of the open lower boundary condition The parameters real s_inflow real c_schange real c_pchange have to be specified In this version the extrapolation of quan tities should be smoother than for inoutflow In simulations of a solar like star with the MSrad radiation transport module the bottom boundary is typically of type inoutflow A supergiant simulation will have a transmitting lower boundary 7 1 4 4 character heat mode The mode in which energy is supplied can be adjusted with this parameter The classical choice is to leave it empty in which case the mode is chosen from s_inflow see Sect 7 1 4 7 and luminositypervolume see Sect 7 1 4 6 Example character heat_mode f A80 b 80 n Heating mode amp c0 bottom_entropy1 bottom_energy1l amp cl core_entropy1 core_energyentropy1 core_energy1 core_energy2 bottom_entropy1 Possible values so far e empty
102. LD manual Makefile output rhd chul rhd chu2 rhd chu3 rhd done 178 rhd end rhd full rhd mcyl rhd mean 168 rhd out 174 rhd snap 178 rhd exe script configure job file uiocat uioinfo uiolook script files table of fluxes 168 formatted Fortran g95 gfortran HD 19 1018 121 Hewlett Packard HION input output Hitachi HP 195 hydrodynamics 121 hydrogen ionization 13711187 IBM IDL 83 155 193 CAT combox pro eosbox pro 186 UIO routines uio_data pro 97 uio_datasetlist_rd pro INDEX uio_dataset_rd pro uio_init pro uio_struct_rd pro inlining alpha Cray VXI IBM Intel compiler on Linux PGI compiler on Linux SGI Sun input chemical reaction network HION Intel Itanium KMP_AFFINITY LHDrad Linux little_endian 64 Loadleveler Macintosh magnetic fields magnetohydrodynamics make clean removeall Makefile configure script UIO MED molecules MSrad A 8 56 E3 61 62109 1 145 A cell centering 168 NEC SX 5 SX 6 SX 8 OMP_NUM_THREADS OMP_SCHEDULE OMP_STACKSIZE opacities 115 OpenMP activation in configure script chunk size KMP_AFFINITY 54 64 KMP_STACKSIZE 64 LD_ASSUME_KERNEL 64 OMP_NUM_THREADS 53 63 OMP_SCHEDULE 53 64 OMP_STACKSIZE 54 64 201 on Cray VX1 on Hitachi on HP on Linux gfortran on Linux I
103. ME_REMOTE_ PLACE cd SOME_REMOTE_PLACE export F90_BASEPATH HOME f or In s F90_BASEPATH hd rhd conf configure configure The variable F90_BASEPATH also has to be set explicitly if the main directory for should have another name Renaming the sub directories with the source files is not a good idea it requires modifications of the configure script itself If you install a new CO5BOLD version on top of an older one it might be safer particularly if Fortran file names have change to remove all earlier generated temporaty links and files with make removeall so that the entire sequence looks like configure make removeall make If you want to remove temporary object and info files after a successful compilation you could use make clean as in configure make make clean 4 3 Configure script The configure script produces a Makefile It is controlled by environment variables see below It tries to use reasonable default values if they are not set properly In the script the machine type is determined with uname m According to the control variables and the machine architecture the compiler name and its compiler flags are composed These are written into the header of a Makefile which is produced in the end An existing Makefile is appended to Makefile_old Additionally the compilation command is written into the file compiler _flags info in a form ready to be included in a Fortran program 4 3 1 C
104. OAT Array 140 141 200 BB3 FLOAT Array 140 140 201 The magnetic field is defined on the cell boundaries in the direction of the spatial components e g BB1 in direction 1 and in the cell centres for the other directions The resulting array dimensions differ from the cell centred quanties like e g rho The array values must be multiplied with a factor Ar in order to obtain the field strength in Gauss The substructure FUL EOS which is present only after a call of e g eosbox pro contains important quantities like the temperature T gas pressure P entropy Structure lt 826a03c gt 6 tags length 109760000 refs 2 P FLOAT Array 140 140 200 DPDRHO FLOAT Array 140 140 200 DPDEI FLOAT Array 140 140 200 T FLOAT Array 140 140 200 DTDEI FLOAT Array 140 140 200 S FLOAT Array 140 140 200 The substructure FUL OPA only contains the opacity KAPPA Structure lt 826a5b4 gt 1 tags length 15680000 refs 2 KAPPA FLOAT Array 140 140 200 10 4 More IDL routines In the directory id1 bf1ib a lot of useful routines can be found which can be used for further processing and visualisation of CO5BOLD data For the visualisation of 2 D models or 2 D data slices in general we recommend plotfield pro With combox pro further quantities can be calculated Furthermore we currently develop a widget based analysis tool called CO5BOLD AT abbrev CAT which will help to work with CO5BOLD data without having to write an
105. P 2000 A positive conservative method for magnetohydrodynamics based on HLL and Roe methods J Comput Phys 160 649 661 link to publisher Leenaarts J amp Wedemeyer B hm S 2005 DOT tomography of the solar atmosphere III Observations and simulations of reversed granulation A amp A 431 687 692 link to ADS Ludwig H G Caffau E Steffen M Freytag B Bonifacio P amp Ku inskas A 2009 The CIFIST 3D model atmosphere grid MemSAIS 80 711 link to ADS Roe P L 1986 Characteristic Based Schemes for the Euler Equations Ann Rev Fluid Mech 18 337 365 link to publisher Rossow W B 1978 Cloud microphysics Analysis of the clouds of Earth Venus Mars and Jupiter Icarus 36 1 50 link to ADS link to publisher Schaffenberger W Wedemeyer Bohm S Steiner O amp Freytag B 2005 Magnetohydrodynamic Simulation from the Convection Zone to the Chromosphere in ESA SP 596 Chromospheric and Coronal Magnetic Fields ed D E Innes A Lagg amp S A Solanki p 65 1 link to ADS Stone J M amp Pringle J E 2001 Magnetohydrodynamical non radiative accretion flows in two dimen sions Mon Not R Astron Soc 322 461 472 link to ADS Tremblay P E Ludwig H G Freytag B Steffen M amp Caffau E 2013 Granulation properties of giants dwarfs and white dwarfs from the CIFIST 3D model atmosphere grid A amp A 557 7 link to
106. Sect 4 4 7 20 4 5 3 Cache usage The user has to find optimum values for the parameters n_hydcellsperchunk for the Roe and the HLLMHD solver module see Sect 7 1 8 9 and n_viscellsperchunk for the tensor viscosity module see Sect 7 1 11 17 to optimize the size of the chunk given to one thread per time For the Roe solver of the hydrodynamics module there exist also the optional parameters n_hydcellsperchunk2 see Sect 7 1 9 1 and n_hydcellsperchunk3 see Sect 7 1 9 2 4 6 SPECIFIC MACHINES amp COMPILERS 59 4 5 4 Inlining Candidate routines for inlining are i e they should be inlined if anyhow possible e file rhd_hyd_module F90 rhd_hyd_avg rhd_hyd_upwind rhd_hyd_pred0 rhd_hyd_predm rhd_hyd_predp rhd_hyd_alpha rhd_hyd_constanteg rhd_hyd_minmodeg rhd_hyd_minmod rhd_hyd_vanleereg rhd_hyd_vanleer rhd_hyd_superbeeeg rhd_hyd_superbee rhd_hyd_ppeq rhd_hyd_pp rhd_hyd_hdflux e file rhd_1hdrad_module F90 rhd_rad3d_raylhd rhd_rad3d_solve rhd_rad3d_solveeq e file rhd_shortrad_module F90 rhd_shortrad_operator rhd_shortrad_dtauop On some machines the Makefile generated by the configure script contains such a list explicitly On others one has to rely on automatic inlining see the following sections 4 5 5 Single versus double precision Usually the files containing the hydrodynamics and EOS data use 4 byte to represent a single number and most of the computations within CO5BOLD are performed in single
107. Sects 10 2 3 10 2 4 more quantities can be calculated IDL gt eosbox ful eos eos opa ierror ierror 10 3 IDL DATA STRUCTURE 187 This operation adds the tags EOS and OPA to the data structure FUL which contain more quantities like e g the temperature see Sect 10 3 Based on the thermodynamic quantities now present in the FUL structure further quantities can be computed with combox pro as for instance in IDL gt cs combox cs ful 10 3 IDL data structure The data structure FUL contains the following variables and substructures Use help str ful to get this information See also the short description of the contents of a model file in Sect 8 1 and particularly the man page of the script uiolook in Sect 6 2 6 2 which gives you even more detailed information directly from the file Structure lt 8287a0c gt 9 tags length 78404128 refs 1 TYPE STRING uLo HEAD STRUCT gt lt Anonymous gt Array 1 DATASET_1D STRING gt single_box MODELTIME FLOAT 10050 1 MODELITIME LONG 64088 DTIME FLOAT 0 176381 TIME_OUT_FULL_LAST FLOAT 10050 1 TIME_OUT_MEAN_LAST FLOAT 10040 0 Z STRUCT gt lt Anonymous gt Array 1 If the command in Sect 10 2 5 has been performed the following substructures are present STRUCT STRUCT EOS OPA gt lt Anonymous gt Array 1 gt lt Anonymous gt Array 1 The substructure FUL Z contains the original data arrays from the model file like the sp
108. Sun Start with st35gm04n03_09 end 12773 gt 17173 Run with SHORTrad This entry is optional it can be omitted completely but it is recommended to put at least some relevant keywords into this array If you change the number of lines between 1 and 20 you have to adjust the size specification d 1 4 in the example above 7 1 PARAMETER FILE RHD PAR 103 7 1 2 4 character history The file history has a similar purpose as the previous entry It can be used to keep information about the parent parameter file as in character history d 1 2 f A80 p 1 b 80 n File history Taken from st35gm04n03_09 par Last Modification 2002 01 01 Its use is optional 7 1 3 Fundamental model parameters 7 1 3 1 real teff The effective temperature is one of the basic model parameters and is specified e g with real teff f F13 3 b 4 n Effective Temperature u K 3500 0 for a relatively cool star Note that this parameter specifies the average output flux only for local models with closed radiative lower boundary and that in many cases the actual effective temperature can only be determined a posteriori For other lower or inner boundary conditions the entropy of the instreaming material s_inflow see below is more important than teff itself See Sect 7 1 4 4 for different heating modes controled with heat_mode 7 1 3 2 character grav_mode Gravity is another characteristic of a stellar atmosphere The type or geo
109. The classical value For local models the energy comes through the lower boundary either by radiation for a closed bottom boundary closedbottom or by convection radiation for an open bottom boundary inoutflow e bottom_entropy1 The entropy in the bottom layers defined as being less than r0_grav above the bottom of the model is adjusted towards s_inflow on a rate given by c_schange e bottom energy1 Energy in the bottom layers defined as being less than r0_grav above the bottom of the model is added according to teff e core_entropy1 The entropy in the core is adjusted towards s_inflow on a rate given by c_schange e core_energyentropy1 The entropy in the core is adjusted towards the mean core entropy ie smoothed on a rate given by c_schange However the total energy input is added according to luminositypervolume This avoids a local pile up of energy in case of a strong core drag force Sect 7 1 4 22 or just slow flows e core_energy1 Energy in the core is added according to luminositypervolume e core_energy2 Energy in the core is added according to luminositypervolume with a Gaussian distribution of the energy source 7 1 4 5 character hdcoreheatprofile This parameter allows to choose between various radial profiles for the core heating It may be called by character hdcoreheatprofile f A80 b 80 n Core heat profile Constant Possible values are e Constant Constantdei Apply the same change of ei in all
110. The following formatting rules apply Currently we only provide a hydrogen atom file H_6 2 atom The module might be extended for other species in a future version e electron density look up table edens dat as function of total number density of hydrogen in cm or m gas temperature in K and ionization degree of hydrogen e chemical abundances abundance input e partition functions pf_kurucz dat The first two files are always needed whereas the files containing chemical abundances and partition functions are required the initial LTE electron densities for very first time step of a model sequence and for creating electron density tables Once the first time step has been calculated the last two input files are obsolete We plan to implement another initial guess for the LTE densities so that only the model atom and the electron density look up table are necessary Refer to Leenaarts amp Wedemeyer B hm 2005 for more details 166 CHAPTER 7 INPUT AND CONTROL FILES 7 7 More control files rhd stop rhd cont rhd dump Before each time step COS5BOLD checks in the working directory whether the file rhd stop exists If it has been generated e g with touch rhd stop the code exits gracefully i e it produces a proper final model which can be used to restart the code This method of stopping a simulation is to be preferred over a simple kill or qdel command because it allows to analyze the state of the model just at the end o
111. The main goal was to investigate the scaling of the performance of CO5BOLD with the number of processors This was done only for the MSrad module considering local surface convection models Two model sizes were tested a small one with 125x125x81 grid points employing non grey radiative transfer 4 frequency bands and a large one with 315x315x81 grid points employing grey radiative transfer Rather short runs of 10 small model and 3 large model time steps were performed Even for the large model the memory demand was ca 800Mb which is very modest considering that every sub node of the machine consisting of 4 processors has 2Gb of memory The results are summarized in the following three figures The black lines give the scaling of the total time the green lines the scaling of the time needed by the hydrodynamics routines and the red lines the scaling of the radiative transfer routines The scaling is presented as the increase of processing time per processors as the problem is distributed among more and more processors The times are normalized to the time that is used in a scalar i e single processor setup Ideally one would like a constant behavior which stays close to one O O Machine grand 125x125x81 grid points 4 OBM band 10 time steps 00 k O mal EN 1 2 Per processor execution time increase 0 5 10 15 20 25 Number of processors Figure 4 2 UKAFF machine grand small model The perh
112. This is not a Fortran standard though and has to be activated in different ways e 0 No conversion default e 1 Use the convert keyword in the open statement Intel and gfortran compilers on Linux machines standard compiler on Dec Alphas e 2 Use asnunit Cray X MP style e 3 Use asnunit Cray TS style 4 4 COMPILER MACROS 45 4 4 3 Equation of state 4 4 3 1 gasinter_101 gas interpolation 101 in gasinter_routines F90 Category performance enhancement This switch determines how temporary arrays are handled and loops are split to improve performance Values e 0 old default Temporary coefficient arrays are actually copied e 1 Temporary coefficient arrays just get a pointer link into the big arrays e 2 No temporary coefficient arrays e 3 Experimental testing only avoid e 4 default Split inner loop into three to give better vectorization 4 4 3 2 gasinter 102 gas interpolation 102 in gasinter_routines F90 Category performance enhancement This switch determines how coefficient arrays are handled to improve performance Values e 0 Coefficients are stored as pointer arrays old version e 1 default Coefficients are stored as allocatable arrays 4 4 4 Opacity 4 4 4 1 opta_switch_101 opacity table switch 101 in opta_switch_routines F90 Category performance enhancement This switch determines how arrays are handled and loops are split to improve performanc
113. _datasetlist_rd modelfile listdata listdata ierr ierr amp if ierr eq 0 then begin amp print i ful z itime ful z time format A 14 16 EF15 8 amp Now do the data handling demo print Mean density avg ful z rho amp i i 1 amp endif amp endwhile All necessary counter information is stored in the structure listdata Note that you can specify an entire group of files with e g modelident _ modelident _ modelident _3 or modelident _ 29 3 0 2 100 CHAPTER 6 DATA FILE TYPES Chapter 7 Input and control files 7 1 Parameter file rhd par The parameter file rhd par also has the UIO format But it will be usually Fortran formatted ASCII It contains a list of parameter entries which are collected in groups to make it easier to find an entry Otherwise the order is arbitrary except for the very first fileform uio entry If there are more than one entry with the same name the first occurrence will be used by CO5BOLD But the doubling of entries is strongly discouraged because it will almost certainly lead to confusion at some time In addition the IDL routine to read the parameter file will fail with an error message Additional entries can be added if the names differ from the standard ones described below Theses entries will be ignored by CO5BOLD but read by the IDL input routine They can be used to provide comments additional infor
114. _for Collect all CO5BOLD files in a tar file for tar gz bin 1s_for List all CO5BOLD Fortran files bin x Further utility scripts doc manual extractmpi Create dummy Fortran file with MPI routine calls doc manual for2tex_co5bold Transform CO5BOLD source code into ATEX doc manual for2tex Transform Fortran source code into ATEX doc manual mk_co5bold Produce PDF and HTML versions of the manual eos 90 conf configure Produce the gas2eos exe Makefile eos 90 job j2 eos_r8tor4 sh Transform EOS tables from double to single precision hd rhd conf configure Produce the CO5BOLD Makefile see Sect 4 3 uio bin uiocat Concatenate files in UIO form see Sect 6 2 6 3 uio bin uioinfo Print machine dependent UIO information see Sect 6 2 6 4 uio bin uiolook Print entry headers of file in UIO form see Sect 6 2 6 2 uio f90 conf configure Produce the UIO Makefile uio f90 conf install Set some paths to install UIO Table 3 6 List of Linux script files 3 4 Documentation files The files in Tab 3 7 provide various information Among them is the general README file and the IEX source of the CO5BOLD manual PDF and HTML versions of the manual are not included and have to be compiled individually by executing mk_co5bold Path and files Description README CO5BOLD installation instructions README_MHD Short description of MHD parameters doc examples ReadMe Description of some CO5BOLD parameter files doc examples par Some CO5BOLD sample p
115. _module F90 Category additional output Produce timing information for 2D 3D tensor viscosity routines It should not be used in conjunction with OpenMP Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 7 Radiation transport 4 4 7 1 rhd_r01 rhd radiation 01 in rhd F90 Category feature activation Switch to include LHDrad radiation transport module It uses long characteristics and is restricted to an equidistant grid and open boundaries at all surfaces old supergiant module Values e undefined default LHDrad routines are deactivated e 1 LHDrad routines are recognized by the compiler 48 CHAPTER 4 COMPILATION amp INSTALLATION 4 4 7 2 rhd r02 rhd radiation 02 in rhd F90 Category feature activation Switch to include MSrad radiation transport module It uses long characteristics The lateral boundaries have to be periodic Top and bottom can be closed or open solar module Values e undefined default MSrad routines are deactivated e 1 MSrad routines are recognized by the compiler 4 4 7 3 rhd r03 rhd radiation 03 in rhd F90 Category feature activation Switch to include SHOR Trad radiation transport module It uses short characteristics and is restricted to an equidistant grid and open boundaries at all surfaces new supergiant module Values e undefined default SHORTrad routines are de
116. _visartificial But the parameter can be used to switch off the divergence terms completely or to change its importance compared to the other terms These divergence terms can be used to reduce the effect of the tensor viscosity in the case of isotropic compression But this reduction c_vistensordiv 0 333333 in 3D c_vistensordiv 0 5 in 2D is usually switched off In addition to the standard tensor viscosity described above there is a point to point viscosity It relies on a completely different discretization It should conserve angular momentum exactly and guarantee positivity of dissipated energy for sufficiently small time steps The point to point viscosity can be used in addition to the standard one or without 7 1 11 10 real c_visp2pcoeff The strength of the viscosity can be controlled with e g real c_visp2pcoeff f E15 8 b 4 amp n Point to point viscosity coefficient u 1 0 20 This parameter is somewhat analogous to real c_visartificial see 7 1 11 3 But it acts on com pression expansion and shear flows A value of 0 0 switches it off 7 1 11 11 real c_visp2phypsmagorinsky This parameter can be set with e g real c_visp2phypsmagorinsky f E15 8 b 4 amp n Smagorinsky parameter for point to point viscosity u 1 0 3 This parameter is equivalent to real c_vissmagorinsky see 7 1 11 2 with the classical implemen tation of the viscosity tensor A value of 0 0 switches it off Values of 0 3 o
117. _visiter hydrodynamics sub steps between viscosity sub steps e gt 0 Not implemented yet Gives the same result as 0 For models with long radiative relaxation time scales a large value of n_hyditer can lead to a significant speed up Choosing a small negative value for n_visiter means that the tensor viscosity sub step is called sufficiently often Note there is not parameter n_vismaxiter So far this parameter is only recognized by the HYD module 7 1 11 2 real c_vissmagorinsky A turbulent viscosity of Smagorinsky type can be activated e g with real c_vissmagorinsky f E15 8 b 4 amp n Turbulent eddy viscosity parameter Smagorinsky type u 1 0 5 134 CHAPTER 7 INPUT AND CONTROL FILES In many cases values around 0 5 are sufficient to stabilize the code Larger values are only neces sary for some nasty under resolved supergiant models Setting c_vissmagorinsky c_visartificial c_visexpansion c_vislinear c_visp2pcoeff 0 0 skips the classical tensor viscosity step entirely 7 1 11 3 real c_visartificial A standard artificial viscosity can be activated e g with real c_visartificial f E15 8 b 4 amp n Artificial viscosity tensor parameter u 1 0 5 In many cases values around 0 5 are sufficient to stabilize the code Larger values are only necessary for some nasty under resolved supergiant models 7 1 11 4 real c_visexpansion An additional viscosity can be activated e g with real c_visexpansion f E15 8 b
118. a a a a a 151 10 CONTENTS 7 1 19 2 integer starttimestep e sa asada m aa e a 00 eee ee ee 151 7 1 19 3 real eputimel s s 4 634 2408 md ae Re ik Bk a o e Aak ae 151 7 1 19 4 real cputime_remainlimit o 151 7 1 19 5 Teal endi Es woo 4 eras a a a e 151 7 1 19 6 real plustimel 2 44 ae ana Ge Dae eh eee ee ae 152 7 1 19 7 integer endtimestep e 152 7 1 19 8 integer plustimestepl 2 o a a 152 Time step control a 152 7 1 20 1 real dtime startl a a a 152 7 1 20 2 Cc os tn en ae ee EN Be ae Ye a 152 7 1 20 3 real Gtime Max ego a eck a Re aa er ee Bean ae 153 7 1 20 4 real dtime min stop e 153 7 1 20 5 real dtime_incmax 2 rer Eeer ar 153 7 1 20 6 r alc courant oir dar dm en A 153 7 1 20 7 real c courantmax ocurra a ak a 153 7 1 20 8 real c maxeichangel e 154 7 1 20 9 real c_hydsoundcouradtb e 154 7 1 20 10 real c_hydsoundcourantmax 2 2 ee 154 7 1 20 11 real c_hydexpcourant o oaa 154 7 1 20 12 real c_hydexpcourantmaxl 2 0 ee 154 11 20 13 real cradcouramtl ee 155 7 1 20 14 real Cc radcouradtmMmax Jl 155 7 1 20 15 real cradmaxeichange 0 00000 eee ee eee 155 7 1 20 16 real c_viscourant 2 ee 155 11 20 17 real c_viscourantmaxl 2 ee 156 Input output control Sa sters stets eas 156 7 1 21 1 real dtime owt falll 156 11 212 real dtime o
119. ace intensities 2D arrays It has more entries than a full model file However they are much smaller Therefore one can afford a higher output sampling rate The format is usually UIO unformatted binary A mean file usually consists of several datasets The overall structure is fileform uio form unformatted convert ieee_4 character file_id f A8 b 8 n File identification character description d 1 1 f A14 p 2 b 14 n File description character history d 1 20 f A80 p 1 b 80 n File history character version f A80 b 80 n Program version label dataset n RHD model label enddataset label dataset n RHD model label enddataset Each dataset has the following structure for a supergiant simulation label dataset n RHD model date 25 05 2001 09 41 29 405 8 3 FILES WITH AVERAGED DATA RHD MEAN 169 label box date 25 05 2001 09 41 29 408 character box_id f A80 b 80 n Block identification rad label endbox label box date 25 05 2001 09 41 29 983 character box_id f A2 b 2 n Block identification zi label endbox label box date 25 05 2001 09 41 30 078 character box_id f A2 b 2 n Block identification z2 label endbox label box date 25 05 2001 09 41 30 170 character box_id f A2 b 2 n Block identification z3 label endbox label box date 25 05 2001 09 41 30 260 character box_id f Ai b 1 n Block identification label endbo
120. activated e 1 SHORTrad routines are recognized by the compiler 4 4 7 4 rhd_rad3d_toray_101 rhd radiation 3 dimensions to ray loop 01 in rhd_lhdrad_module F90 Category performance enhancement There might be a performance gain by splitting the main loop in routine rhd_rad3d_toray into three separate loops Typically one big loop is to be preferred Values e undefined default One big loop e defined Three smaller loops 4 4 7 5 rhd_rad3d_fromray_101 rhd radiation 3 dimensions from ray loop 01 in rhd_1hdrad_module F90 Category performance enhancement There might be a performance gain by splitting a big loop in routine rhd_rad3d_fromray into two separate loops Typically one big loop is to be preferred Values e undefined default One big loop e defined T wo smaller loops 4 4 7 6 rhd rad3d r02 rhd radiation 3 dimensions radiation 02 in rhd_lhdrad_module F90 Category test Module rhd_lhdrad_module contains a routine for the handling of periodic boundaries It is in an experimental state and is deactivated by default Values e undefined default Skip routine rhd_rad3d_dirper during compilation e defined Compile routine rhd_rad3d_dirper 4 4 COMPILER MACROS 49 4 4 7 7 rhd_rad3d_solve_t01 rhd radiation 3 dimensions solve timing 01 in rhd_lhdrad_module F90 Category additional output Produce timing information for the routines which solves the 1D radiation transp
121. actor u 1 amp c0O range 0 0 lt C_radCourant typically 1 0 20 If the estimate of the timescale would be correct a value of 2 0 would cause the temperature fluctuation on the shortest scale to flip its sign setting the absolute stability limit A value of 1 0 would lead to a damping of theses fluctuations within one time step But in practice even higher values for example 2 5 show a reasonable behavior This might be due to the effect that the shortest radiative timescale only occurs at single points or in 2D layers but that already the immediate neighbors have longer timescales and can damp the most sensitive points Based on real c_radcourant the recommended typical radiative time step is computed 7 1 20 14 real c_radcourantmax With this parameter the maximum allowed radiative time step is prescribed as e g in real c_radcourantmax f E15 8 b 4 n maximum RAD Courant factor u 1 amp c0O range C_radCourant lt C_radCourantmax typically 2 0 3 0 This value will typically be somewhat larger than real c_radcourant 7 1 20 15 real c radmaxeichange The relative energy change per radiative sub step can be restricted e g with real c_radmaxeichange f E15 8 b 4 n maximum radiative energy change amp u 1 cO range 0 01 1 0 0 25 The default is 0 5 Values between 0 1 and 0 5 seem reasonable A value lt 0 0 deactivates this time step check However the check of the radiative energy change
122. adiation direction 1 loop 01 in rhd_shortrad_module F90 Category performance enhancement Choose routine version for rays in xl direction Values e 0 old default Use routine with permuted indices for rays in x1 direction In this case the innermost loop index is the third array index The transposition of arrays is not needed but some machines e g SUN1 do not like this index arrangement e 1 default Transpose arrays and use routine rhd_shortrad_dir3 for rays in xl direction The extra step for the transposition of some arrays and the reverse procedure needs some time But now the routine with the optimum index ordering can be used e 2 Transpose arrays serially and use routine rhd_shortrad_dir3 for rays in x1 direction The extra step for the transposition of some arrays and the reverse procedure needs some time But now the routine with the optimum index ordering can be used 4 4 COMPILER MACROS 51 4 4 7 16 rhd_shortrad_dir_102 rhd short characteristics radiation direction loop 02 in rhd_shortrad_module F90 Category performance enhancement OpenMP Determine position of PARALLEL statement relative to outer loop in rhd_shortrad_dirX Both settings give the same results but might show a different performance on a specific machine Values e 0 old default PARALLEL statement inside of outer loop e 1 default PARALLEL statement outside of outer loop 4 4 7 17 rhd shortrad lambda 101 rhd short cha
123. ae we a da a Bet HAR we 180 185 A IE ee a be Be as 185 10 2 CO5BOLD data in IDL a 185 10 2 1 Loading the parameter file ee 185 10 2 2 Loading CO5BOLD data full sta end chul f oaa 186 10 2 3 Loading the equation of state o o ee 186 10 2 4 Loading the opacity table 0 o e e e 186 10 2 5 Computation of deduced quantities o e e e e 186 LR ERA a ta R 187 10 4 More IDL routines 20000 wen ete A Oh ae on e A A es 188 189 193 195 13 Bibliography 198 199 12 CONTENTS List of figures 4 1 Performance tests on Hitachi SR8000 ee 59 4 2 UKAFF machine grand small model 0e 67 4 3 UKAFF machine grand large modell o e 68 4 4 UKAFF machine ukaff large modell eee 68 9 1 Program scheme oaoa 180 13 14 LIST OF FIGURES List of tables 3 1 List of source directories 2 oeo e e a 29 Ee ete ee ee ee 30 3 3 List of all low level modules a a a 31 3 4 List of all tweak modules 2 1 a 31 3 5 List of all unit test modules 2 2 e a 31 AA GES pe cesar IE Se VR Gr a eee 32 Se Soe fa Ak He Baty ea ee 32 6 1 CO5BOLD control and data files 2 e 84 ae eeu geen Sige whee Gee eee oe one Ge eee a eens Ge ae ees 86 ord ts oy es a hes Wen ee ee MU ENE Ee Se ch ey ace Re a e oa ee ee a 87 a a en 87 6 5 UIO Fortran90 Klesl a a e 90 aeae a a en edn S BS 90 e Mian A en EO ee a t
124. al s_inflradgrad In the case of a central potential one can decrease the entropy in the very center of the core to generate some extra braking buoyancy e g with real s_inflradgrad f E15 8 b 4 n Radial gradient of core entropy amp u erg K g 1 0E 06 While the value of the core entropy s_inflow is typically of the order of 1 0E 09 this parameter is typically of the order of 1 0E 06 A value of 0 0 default causes a zero gradient 7 1 4 9 real s_infllatgrad In the case of a central potential one can enforce a meridional flow the 13 axis is the z axis by enforcing a lateral entropy gradient in the core e g with real s_infllatgrad f E15 8 b 4 n Lateral gradient of core entropy amp u erg K g 1 0E 06 This might come useful in the case of rotating models While the value of the core entropy s_inflow is typically of the order of 1 0E 09 this parameter is typically of the order of 1 0E 06 A value of 0 0 default causes a zero gradient 7 1 4 10 real c_schange The entropy s_inflow of the material in the bottom layer solar case inoutflow boundary condition or the central region of the global model is not just set to the specified but adjusted towards it The adjustment rate can be controlled with e g real c_schange f E15 8 b 4 amp n Rate of entropy change for open lower boundary u 1 0 3 7 1 PARAMETER FILE RHD PAR 109 Guide values are e 1 0 fast adjustment 0 3 typical value e 0 1 slow ad
125. all high level modules the table shows the file name with part of its path the shortcut for the directory and its description 3 2 FORTRAN FILES 31 Path and file Abb Description hd rhdb rhd_action_module f90 RHDB control parameter passing hd rhdb rhd_box_module F90 RHDB box handling hd rhdb rhd_dat_module F90 RHDB handling of averages hd rhdb rhd_gl1_module f90 RHDB global parameters hd rhdb rhd_io_module F90 RHDB input output hd rhdb rhd_mean_module f90 RHDB averaging routines hd rhdb rhd_mpi_module F90 RHDB MPI routines under construction hd rhdb rhd_phys_module f90 RHDB physics routines source terms hd rhdb rhd_prop_module f90 RHDB box properties hd rhdb rhd_rec_module f90 RHDB reconstruction routines hd rhdb rhd_sub_module f90 RHDB additional routines cons f90 const_module f90 CON physical amp mathematical constants mat str str_module f90 STR string handling time f90 timing_module F90 TIME timing routines uio f90 uio_base_module f90 UIO I O routines uio f90 uio_bulk_module f90 UIO I O routines uio f90 uio_filedef_module f90 UIO I O routines uio f90 uio_mac_module F90 UIO I O routines machine dependend part Table 3 3 List of all low level modules the table shows the file name with part of its path the shortcut for the directory and its description Path and file Abb Description hd tweak rhd_scale_module F90 TWEAK scale parameters hd tweak rhd_tweak_massreduction_module F90 TWEAK redu
126. ammai for T Camel Case and or underscores can be used to make variable names easier to read Variable names in often used structues e g the box structure should be used as guide for further names see e g Sect 8 1 and Sect 8 3 The individual components of vector quantities axes velocities magnetic field components don t get individual letters but indices 1 2 3 for the respective spatial dimension So far these stand for the x y and z direction But these names should be avoided leaving the possibility of for instance spherical coordinates open Names of basic quantities are e g rho vi ei for density p velocity vl in x direction and internal energy ei per mass unit The centering of variables can be indicated by c for cell centered quantities and b for boundary centered quantities as in xc1 or xb1 As cell centering is the default the c is often omitted as in rho or ei Names of quantities that are simple combinations of existing quantities are often constructed as combinations as e g rhov1 for the momentum rho v1 instead of inventing an entirely unrelated name as e g m1 The name of an energy tells abouts its components e g eikg ei ek eg sum of internal kinetic and potential energy per mass unit Likewise rhoeikg rhoei rhoek rhoeg sum of internal kinetic and potential energy per volume The convention of combining names obviously has limits for more complex functions as e g f
127. and ierr is set to a value larger than 0 To read all entries in a list of files in sequence the routine uio_datasetlist_rd pro is convenient as in the short example ierr 0 delvar listdata Loop over all datasets while ierr eq 0 do begin amp Read the next dataset ful uio_datasetlist_rd testmodel_0 full listdata listdata ierr ierr amp if ierr eq 0 then begin amp print ful z time format A E15 8 amp Now do the data handling demo print Mean density avg ful z rho amp endif amp endwhile or in the more detailed example model st33gm06n03 modelident _ amp parmodelident _01 modeldisk getenv HOME dat rhd d model modelfile modeldisk model modelident bull parfile modeldisk model parmodelident par Read parameter file par uio_struct_rd parfile 6 2 UIO DATA FORMAT 99 Open first dataset to get some information about array sizes delvar listdata ful uio_datasetlist_rd modelfile listdata listdata ierr ierr uio_closrd listdata channel delvar listdata nxci n_elements ful z xc1 nxc2 n_elements ful z xc2 nxc3 n_elements ful z xc3 n_timestep 1000 Some huge value to get everything Reduce for tests ierr 0 i 0 Loop over all datasets while ierr eq 0 and i lt n_timestep do begin amp 3 Read the next dataset ful uio
128. application of the centrifugal force in case of a non zero rotation rate In this case only the Coriolis force is applied By default the centrifugal force is activated if the rotation rate nu_rotation is non zero but only for global models as the centrifugal force for local models would in effect only modify the value of the gravity constant 7 1 3 10 real nu_rotation To transform onto a rotating coordinate system a rotation rate can be specified with e g real nu_rotation f E15 8 b 4 n Rotation frequency u 1 s 0 01 The potential is modified by adding terms due to a centrifugal force unless centrifugal_force is set to off In addition a Coriolis force is applied during the hydrodynamics step 7 1 3 11 real ar_rotationaxis The rotation axis can be specified with real ar_rotationaxis f E10 4 b 4 p 1 d 1 3 n Rotation axis u 1 1 0 0 0 0 0 The default value is 0 0 0 0 1 0 and should be used for rotating global models A different axis only makes sense for local models 7 1 4 Boundary conditions general The boundary conditions at the six sides of the computational box cannot be specified independently For the naming convention of the boundaries a gravitational acceleration in x3 direction is assumed Accordingly there is a bottom and a top boundary and four side boundaries All boundary conditions of the hydrodynamic case are available in the MHD module 7 1 4 1 character side bound The boundary condition at all
129. aps most interesting result is that the speedup on ukaff is about 11 for the large model on 16 processors Perhaps not ideal but within the range of practical interest In general the hydrodynamics 68 Per processor execution time increase Per processor execution time increase CHAPTER 4 COMPILATION amp INSTALLATION Machine grand 315x315x81 grid points 1 OBM band 3 time steps A 10 15 20 25 Number of processors Figure 4 3 UKAFF machine grand large model Machine ukaff 315x315x81 grid points 1 OBM band 3 time steps 5 10 15 20 25 Number of processors Figure 4 4 UKAFF machine ukaff large model 4 6 SPECIFIC MACHINES amp COMPILERS 69 routines scale more favorably than the radiation routines This is perhaps simply related to the fact that in explicit hydrodynamics communication is restricted to neighboring grid cells For those wondering the black curves do not lie between the red and green curve since more compo nents than just radiation and hydrodynamics add up to the total time Furthermore the normalization of the execution times given by CO5BOLD is not exact 4 6 15 Sun SunFire CO5BOLD has been used on the SunFire machines firel fire2 and fire3 in Uppsala with compiler version Sun WorkShop 6 update 2 Fortran 95 6 2 2001 05 15 and later An older version was not able to compile CO5BOLD properly Important switches are e openmp Enable OpenMP e fa
130. arameter files doc info txt A mix of info files release notes todo list doc manual cobbold tex The IXI X source of the manual uio man man1 man pages for UIO scripts see Sect 6 2 6 Table 3 7 List of documentation files Chapter 4 Compilation amp installation In this section the installation procedure is outlined and compiler switches necessary to compile CO5BOLD and to optimize its performance are described 4 1 Quickstart How to compile CO5BOLD If you are going to install CO5BOLD on a machine with a known to setup script and generated Makefile operating system and compiler see Sections 4 3 and 4 5 then the procedure should be fairly easy The general compilation procedure is now tar zxvf for tar gz cd for hd rhd mkdir p YOUR_MACHINE cd YOUR_MACHINE ln s conf configure configure make The compilation process is explained in more detail in Sect 4 2 The configure script is described in its header and in Sect 4 3 The directory structure is shown in Tab All Fortran files are listed in Tables and 4 2 Compilation procedure for CO5BOLD The installation procedure has changed significantly since the early releases now there is a configure script see Sect 4 3 that creates the complete temporary Makefile which can be used to compile CO5BOLD and produce the executable rhd exe The detailed installation procedure is 1 Choose create a proper base directory This could be HOME The
131. arrays01 pointer or better allocatable arrays in the data structure box see Sect 4 4 1 4 The classical implementation with pointer arrays works in most all cases and is the default However the implementation with allocatable arrays is a bit faster but causes runtime errors with several current compilers e gasinter_101 array treatment in the EOS routines see Sect 4 4 3 1 e gasinter_102 pointer or better allocatable arrays in the data structure for the EOS tables see Sect 4 4 3 2 e opta_switch_101 array treatment in the opacity routines see Sect 4 4 4 1 e rhd_hyd_entropyfix_p01 loop with if then else or masks in rhd_hyd_module F90 see Sect 4 4 5 2 e rhd_hyd_upwind_p01 loop with if then else or masks in rhd_hyd_module F90 see Sect 4 4 5 3 e rhd_roeld_flux_101 treatment of upwind direction in rhd_hyd_module F90 see Sect 4 4 5 4 e rhd_shortrad_operator_101 operator version in rhd_shortrad_module F90 see Sect 4 4 7 10 e rhd_shortrad_operator_102 way of operator inlining in rhd_shortrad_module F90 see Sect 4 4 7 11 e rhd_shortrad_dtauop_101 operator version in rhd_shortrad_module F90 see Sect 4 4 7 12 e rhd_shortrad_dtauop_102 way of operator inlining in rhd_shortrad_module F90 see Sect 4 4 7 13 e rhd_shortrad_dir1_101 direct integration or transpose for nearly vertical rays in rhd_shortrad_module F90 see Sect 4 4 7 15 e MSrad_raytas loop type in MSrad3D F90 see
132. ary 85 6 2 3 2 Data file structure ooa e 86 6 2 3 3 Tables ai te he Gt ae a a ee A 87 6 2 3 4 Recommendations for standard file structure 89 6 2 4 Files amp directories amp paths 0e 89 6 2 5 Eortran90f e 4 a an eA on ek a a Re ee ale waka 90 6 2 5 1 Files 2 422 ba Phe ab Ree ea ee eee eee eee eee ad 90 6 2 5 2 Use of UIO modules in Fortran90 20 91 6 2 5 3 Compiling and Makefiles 0 020000 0000 91 6 2 5 4 Sample calls of Fortran UIO routines 92 SS WR Ear on eee 93 6 2 6 1 Installation of UIO UNIX scripts o o e 93 6 2 6 2 Quick examination of files uiolook ooo aa a 94 6 2 6 3 Transformation of files uiocat o o 200 4 94 6 2 6 4 Information about conversion types uioinfo 95 6 2 7 IDL UIO routines 0 eeen 95 6 2 7 1 Initialization of UIO routines under IDL 96 6 2 7 2 Reading data with ulo_data prol o o e e 97 6 2 7 3 Reading data with uio_dataset_rd pro or uio_datasetlist_rd pro 98 101 NN 101 7 1 1 Quickstart How to make a proper parameter file 101 LE nr BIT ioe Sor ET A B a Ye ee 102 7 1 2 1 MA sar an bor rn eea a ea EB Ee OE Ea ae 102 7 1 2 2 character fileid oaoa a o 102 7 1 2 3 character description eeen 102 7 1 2 4 character history eeen 103 7 1 3 Fundamenta
133. atial axes density rho internal energy ei and the three spatial components of the velocity v1 v2 v3 Structure lt 8274184 gt 16 tags length 78403900 refs 2 TYPE STRING uio BOX_ID STRING tz DIMENSION LONG Array 2 3 TIME FLOAT 10050 1 ITIME LONG 64088 Ke FLOAT Array 140 1 1 XC2 FLOAT Array 1 140 1 XC3 FLOAT Array 1 1 200 XB1 FLOAT Array 141 1 1 XB2 FLOAT Arrayl1 141 1 XB3 FLOAT Arrayl1 1 201 RHO FLOAT Array 140 140 200 EI FLOAT Array 140 140 200 vi FLOAT Array 140 140 200 V2 FLOAT Array 140 140 200 V3 FLOAT Array 140 140 200 The spatial axes are XC1 XC2 XC3 XB1 XB2 XB3 The indices stand for 1 2 2 y 3 z or h C for the grid cell centre B for the boundaries Most of the quantities are defined for the cell centres In case of doubt this can be found out by checking the array dimensions the number of cell boundaries is one larger than the number of cell centers The substructure FUL Z can contain additional arrays in case of dust formation chemical reaction networks or time dependent hydrogen ionization 188 CHAPTER 10 DATA ANALYSIS WITH IDL QUCOO1 FLOAT Array 140 140 200 QUC002 FLOAT Array 140 140 200 QUCOO3 FLOAT Array 140 140 200 QUCOO4 FLOAT Array 140 140 200 The meaning of the quantities depends on the used source term module The magnetic field compo nents are also stored in this substructure BB1 FLOAT Array 141 140 200 BB2 FL
134. ating GAS or EOS quantities Standard MPI routines and definitions Works only for upper bound_r3 boundary not for all 6 sides PROCEDURE EXAMPLE call rhd_bound_3DTransmit model action 0 5 MODIFICATION HISTORY First Version 2010 04 05 B F 2010 04 28 B F 2012 11 08 B F 2012 11 09 B F 2012 11 12 B F bound_transmitting3 Minor modifications New parameters in call MPI version MPI parameters put into prop structure The description of modules and routines should start at column 27 unless the name is too long With the script listroutines these entries can be generated almost automatically The description of a variable should start at column 18 unless the name is too long It should start with a long variable name delta_time for dtime that explains the short name followed by a short comment about the purpose of the variable 5 4 4 Comment lines A subroutine function or program should not contain completely empty lines but should start such a line with a properly indented exclamation mark Comments should be indented as the surrounding Fortran code Comments should typically be formulated as an order and start with a verb Comments should start with a space separated triple hyphen block as in Show a typical comment 5 4 5 Short comments after Fortran statements The final statement of a counting do loop should have the loop index as comment as in do i
135. c hange s s sa poaae ee 110 1417 Teal G ASUS zon oe eta nend week a ve Wed ven ae ee a Be vk 110 7 14 18 real c_hptopfactor eee 110 7 14 19 real c_radhtautop l a endda aaa nasaek ee 111 7 1 4 20 Teal PITA 6 woke ke See a Ae Oe ee ee ei EES 111 114 21 real rho MM sos oea bea eee oo ers eS 111 714 22 real c coredrag ss sa eg oaa ea o eee 111 714 23 character hdcoredragprofile ee 111 7 1 5 Boundary conditions MHD only 112 7 1 5 1 character side_bound_mag x1 and side_bound_magx2 112 7 1 5 2 character top bound mag o 113 7 1 5 3 character bottom bound mag o ee 113 1154 real bl inflow s s o u gop nu uwe ene 2 a iia UE a e a a eS 114 7 1 5 5 real comagthetabl aa a 114 7 1 5 6 real c_magphibl aaa a 114 7 1 6 Equation of state ee 114 7 1 6 1 character e stillel 04 sort vara wete a ca Hen 114 7 1 6 2 character eospath o ee 115 T 1 7 QPacities i ee ak SoS Sees ee ee EE Ss ER ea ek a es 115 7 1 7 1 character opafile eee 115 7 1 7 2 character opapath o e o 116 7 1 8 Hydrodynamics control HD and MHD o o o o ooo oo 116 7 1 8 1 character hdscheme a 116 7 1 8 2 character hdtimeintegrationscheme 117 7 1 8 3 character hdsplit o o a 117 1 1 8 4 character reconstruction eeen 118 7 1 8 5 real C eramu lo foes 6 gia ae ar ae Rea GO es Al ee HED
136. call uio_rd ncin termt ntt rho ident ilb ilow 1 1 Alternatively it is possible to search in the file for a special entry or to search in a specially generated entry list with call uio_srhd ncin termt ntt type real ident rho outstr outstr ierr ierr Additionally the uio_var_module makes it possible to read any entry into an UIO flexible variable and the uio_varfile_module allows the reading of a complete file into a special file structure of UIO flexible variables To close a file after reading use uio_closrd ncin There are several examples of programs with UIO routines like uio_var_test f90 uio_varfile test f90 uiotst f90 uio_demo f90 and of course CO5BOLD 6 2 6 UNIX scripts So far there exist three UNIX shell scripts useful to quickly examine data sets uiolook to change the format or conversion type of files uiocat or to print some information about the conversion types possible on the local machine uioinfo 6 2 6 1 Installation of UIO UNIX scripts The installation procedure for the UIO scripts has been updated to make use of its own configure script Therefore the procedure should now look like tar zxvf for tar gz ed for uio f90 YOUR_MACHINE configure make make install or tar zxvf for tar gz cd for uio f90 mkdir YOUR_MACHINE cd YOUR_MACHINE ln s conf configure configure make make install Some of the environment variables that control the CO5BOLD co
137. ce mass hd tweak rhd_tweak_ppdamp_module F90 TWEAK damp plane parallel modes hd tweak rhd_tweak_ppdamp12_module F90 TWEAK damp plane parallel modes hd tweak rhd_tweak_ppdamp45_module F90 TWEAK damp plane parallel modes hd tweak rhd_tweak_smallrhodamp_module F90 TWEAK damp fluctuation at small densities hd tweak rhd_tweak_smallrhodampmassred_module F90 TWEAK damp fluctuations and change mass hd tweak rhd_tweak_smallrhodampnurotinc_module F90 TWEAK damp fluctuations and change rotation Table 3 4 List of all tweak and sccale modules the table shows the file name with part of its path the shortcut for the directory and its description Path and file Abb Description hd unitt rhdut F90 UT unit test program hd unitt UT_module F90 unit test routines hd rhd rhd_baseradUT_module f90 unit tests of basic radiative transfer hd rhdb rhd_meanUT_module f90 unit tests of averaging routines hd rhdb rhd_recUT_module f90 unit tests of reconstruction routines Table 3 5 List of all unit test modules including the unit test main program the table shows the file name with part of its path the shortcut for the directory and its description 32 CHAPTER 3 CO5BOLD FILE OVERVIEW 3 3 Script files The Linux scripts in Tab 3 6 perform various tasks like producing the CO5BOLD or UIO or gas2eos exe Makefile starting or aiding the compilation of the manual from the 4TRX source etc Path and files Description bin collect
138. come considerably smaller than in the hydrodynamic case This happens because the time step is also limited by the Alfv n speed which is large in regions with strong magnetic field and low density small plasma To avoid an extreme time step reduction the Alfv n speed can be artificially limited This this is done by reducing the Lorentz force in the momentum equation by a factor f This factor is calculated with the following formula VA max ma aa where va is the original Alfv n speed and va max is the desired maximum value of the Alfv n speed Cur rently this feature works only with the HLL solver It is advisable to use this feature only in combination 2 3 A COLLECTION OF THERMODYNAMIC RELATIONS M STEFFEN AIP 23 with either the thermal energy equation beta_inv 0 0 or the dual energy method In the latter case beta_inv should be chosen small enough so that the region where the Lorentz force reduction is active is handled by the thermal energy equation This is obtained with beta_inv S yv a c where cs is the speed of sound and y the adiabatic exponent This module has been extensively tested It should be able to handle many MHD flows of astrophysical interest Bugs and problems can be reported to werner schaffenberger gmx at 2 3 A collection of thermodynamic relations M Steffen AIP 2 3 1 Basic thermodynamic equations Differential relations P de Tds dp 20 p where e is the internal energy 1
139. compilation this is done by the configure script if the environment variable F90_DUST is set to 1 see the description of the variable in Sect 4 3 1 13 2 put arrays specifying the initial conditions of the additional density into the start model as real quc001 real quc002 3 select a proper model describing dust or molecule formation in the parameter file with character dustscheme 4 4 1 7 rhd box bmag01 rhd box b magnetic 01 in rhd_box_module F90 and rhd F90 Category feature activation CO5BOLD can handle magnetic field arrays if this compiler switch is set Values e default no handling of magnetic field arrays e handling of magnetic field arrays is activated To actually account for magnetic fields in a simulation it is necessary to 1 set the switch Drhd_box_bmag01 1 during compilation this is done by the configure script if the environment variable F90_MHD is set to 1 see Sect 4 3 2 put arrays specifying the initial conditions of the boundary centered magnetic field arrays into the start model as real bb1 real bb2 real bb3 3 select an hydrodynamics scheme that is able to handle magnetic fields in the parameter file with character hdscheme 44 2 Input output with UIO 4 4 2 1 uio switch system 101 uio switch system list 01 in uio_mac_module F90 Category I O account for property of machine Sometimes it is useful to have in the header of a UIO file information about the
140. core volume elements old default This gives a larger change of pei than Constantdrhoei in the central part of the core where the density is higher e Constantdrhoei Apply the same change of pei in all core volume elements 108 CHAPTER 7 INPUT AND CONTROL FILES 7 1 4 6 real luminositypervolume The luminosity of a star in a box or a local model with the appropriate heat_mode can be set with this parameter To avoid numbers that do not fit into a 4 Byte real the luminosity per volume has to be specified as e g in real luminositypervolume f E15 8 b 4 n Luminosity per core volume amp u erg cm 3 s 4 5E 02 The reference volume is 4 3 T TO Sey or 4 37 r02 re If this parameter is set to a value of 0 0 or below the entropy of the material within the core defined by as all cells within radius r0_grav is adjusted instead 7 1 4 7 real s_inflow The entropy of the material streaming through an open boundary of type inoutflow into the model can be specified e g with real s_inflow f E15 8 b 4 n Entropy of core material amp u erg K g 3 25E 09 In the case of a central potential the entropy in a sphere with radius rO_grav is adjusted towards this entropy value In both geometries supergiant as well as solar this value is very important as it finally but indirectly determines the luminosity and effective temperature of the star A value of 0 0 default or below disables this energy input 7 1 4 8 re
141. d It was recommended and used in various simulations but is now replaced by a second order reconstruction e Superbee The most aggressive first order reconstruction method It results in the steepest shocks which works well in some test cases but tends to turn smooth gradients into steps and might be to difficult for the radiation transport module to handle e PPmimo MinMod reconstruction based on boundary values from PP e PP Chooses the piecewise parabolic reconstruction of the PPM scheme Piecewise Parabolic Method see Colella amp Woodward 1984 Results in 3rd order accuracy for the advection e FRmimo MinMod reconstruction based on boundary values from FRmono e FRmono 2nd order monotonic reconstruction derived from PP WENO and MinMod Franken stein s Method e FRmono2 2nd order monotonic reconstruction derived from PP WENO and MinMod It is identi cal to FRmono if c_slopered 0 0 the usually adopted default choice see Section 7 1 9 7 However for c_slopered gt 0 0 it uses Constant reconstruction as fallback instead of Minmod as FRmono does This is the recommended fallback version for red supergiant models e FRweno 2nd order non monotonic version of FR This or FRweno2 is now the recommended value e FRweno2 2nd order non monotonic version of FR It is identical to FRweno if c_slopered 0 0 the usually adopted default choice see Section 7 1 9 7 However for c_slopered gt 0 0
142. d 1 Checks if the regions sequentially executed contain orphaned directives during run time when PROCNUM 23 is specified If a sequentially executed region contains an orphaned directive the system outputs a message and terminates the program nestcheck 1 Checks for nesting errors in parallel regions If a parallel region is nested the system returns an error and terminates the program Without this option the code aborts with an error message indicating illegal nesting Compiler bug pmpar Collects the performance monitor information for each parallelization unit pmfunc Collects the performance monitor information for each procedure Drhd_hyd_roe1d_101 1 Optimization Choose non standard set of routines for Roe solver See Sect 4 4 8 2 DMSrad_raytas 0 Optimization choose default version of loop in SUBROUTINE raytas in file MSrad3D F90 See Sect 4 4 7 20 Important note The UIO routines need in addition the compiler option subchk Array bound checking Without this checking option some UIO routines are not working properly compiler bug A proposed compiling sequence is only default modules activated export F90_PREFLAGS subchk configure make UIO export F90_PREFLAGS configure make Performance tests on hwwsr8k Some tests have been performed on the machine hwwsr8k at HLR Stuttgart in order to determine the optimum chunk sizes which are set by the parameters n_hydcellsperchunk and n_viscellspe
143. d Fortran90 are used 5 3 2 Program names Program names are short without hyphen rhd rhdmpi rhdUT Programs should reside in files with the same name plus suffix 5 3 3 Names of modules subroutines and functions Module names should end in _module They should have at least one and at most two underscores indicating the module group name and subgroup name like group_module or group_subgroup_module Contained routines are then named group _DoThis or group_subgroup_DoThat or group_subgroup_SomeOperation Routine names should contain at least one at most three un derscores Thus the name should indicate the module the routine belongs to Short names like Init or Output should not be used to avoid name space pollution and be called group _Init or group_subgroup_Output instead Ideally all routines should have a globally uniq name even if that not strictly necessary because modules are never used together or some subroutines are kept private in the modules The use of CamelCase for the subroutine name is encouraged If unit test routines for a group_module or group_subgroup_module are collected in a separate mod ule this should be called groupUT_module or group_subgroupUT_module respectively 5 3 4 Variable names As variable names are more local than subroutine or module names and the naming conventions vary even more depending on author and date Mathematical conventions should be used as guide lines e g gamma for y or G
144. d and resumed with a smaller one Usually n_hydmaxiter will either be set to a value somewhat larger than the recommended number of iterations n_hyditer or to 0 which disables the check for too many iterations completely This can be safely allowed in many cases To disable the iteration of the hydrodynamics sub step set n_hyditer 0 In case of the MHD module this parameter sets the maximum number of MHD substeps If this parameter is set to zero the number of MHD substeps is not limited 7 1 8 8 character hdtmpstructkeepmode With this parameter one can control if some temporary large 3D array structures are kept during the run of the program or are only allocated when needed and deleted immediately afterwards The structures are used in the HYD the MHD and the VIS module The parameter can be set e g with character hdtmpstructkeepmode f A80 b 80 amp n Retaining mode for large temporary structures amp c0 Keep new default Delete old Keep The choices are e Keep Keep the large temporary structures until the end of the program This requires some what more memory which during normal CO5BOLD runs is of no concern but can improve the performance slightly because particulary the deallocation of large arrays costs time new default e Delete Delete the large temporary structures immediately after they have been used This mode can be chosen if memory is a problem old 7 1 PARAMETER FILE RHD PAR 121 7
145. d edit own IDL code The routines are stored if available in the directory IDL COBOLDAT and have to be started with Ccat 2001 12 30 2002 02 16 Chapter 11 Document history First version of the manual First version of the manual on the web lots of extensions and changes in between 2004 02 23 2004 02 23 2004 03 02 2004 03 02 2004 03 03 2004 03 04 2004 03 04 2004 03 04 2004 03 04 2004 03 04 2004 03 04 2004 03 04 2004 03 04 2004 05 03 2004 05 14 2004 07 26 2004 08 18 2005 03 08 2006 07 28 SGI Origin compiler settings section modified for CINES machines short example for uio_datasetlist_rd pro usage Intel compiler settings section modified LD_ASSUME_KERNEL 2 4 19 4 6 8 SGI Origin compiler settings section modified 4 6 13 IBM compiler settings section added Document history started pretty late Dedicated OpenMP section 4 5 1 Dedicated inlining section 4 5 4 Parameter for core drag force New EOS table for solar composition Trademarks List of new dust files the table was split into two 3 2 Installation of UIO UNIX scripts with configure Thermodynamic relations Point to point tensor viscosity New gravitational potential mimicking a travelling tidal wave New control files rhd dump and rhd snap to request a snapshot of current model New control parameter dtime_out_end 7 1 21 2 Preparation for major code release beta version with the new modu
146. ded Entropy3gMps This parameter is not recognized by the MHD module 7 1 9 15 character hdenthalpyavgmode This parameter controls the type of averaging used to get from the cell centered enthalphy flux the boundary centered enthalphy flux To this flux the Roe corrections are added It can be set e g with character hdenthalpyavgmode f A80 b 80 amp n Mode for enthalpy averaging amp c0 Normal old default CA1 CA1g CAlgMps recommeded CA1M CA1Ms CA1p CAis amp c1 CA2 CA2g CA2M CA2p CA2s CA3 CA4 CA1gMps The choices are e Normal Use the standard Roe averaging of the enthalpy kinetic energy fluxes old default e CA1 Average the enthalpy and multiply with the average mass flux Average the kinetic energy fluxes as in the standard Roe case e CAlg Use the consistent advection centering for the average enthalpy flux as in CA1 for small fluctuations Switch smoothly to the Normal Roe averaging for large non hydrostatic pressure fluctuations e CAlgMps Use the consistent advection centering for the average enthalpy flux as in CA1 for small Mach numbers Switch smoothly to the Normal Roe averaging for large Mach numbers or large fluc tuations fluctuations in pressure directly and after subtracting the hydrostatic pressure correction and entropy This case is recommended e CA1M Use the consistent advection centering for the average enthalpy flux as in CA1 for small Mach numbers Switch smoothl
147. des SSE2 vector commands xP Optimization for hardware old optimize especially for Core 2 Duo and simular architectures xSSE4 2 Optimization for hardware Optimize for machines with SSE 4 2 vector instructions xAVX Optimization for hardware Optimize for machines with AVX vector instructions By now there are several more advanced versions of this Drhd_box_arrays01 1 Optimization activate a faster way of handling arrays in structures see Sect 4 4 1 4 That works e g in version 12 1 of the compiler but not in more recent ones DMSrad_raytas 2 Optimization choose non default version of loop in SUBROUTINE raytas in file MSrad3D F90 See Sect 4 4 7 20 Drhd_shortrad_dir1_101 1 Optimization Transpose arrays and use routine rhd_shortrad_dir3 for rays in x1 direction See Sect 4 4 7 15 openmp Parallelization activate OpenMP directives Note that the for compiler versions before 9 0 the UIO routines should be compiled without OpenMP support even if they do not contain any OpenMP directives themselves static Linking prevent linking with shared libraries This is usually part of fast and does not seem to have any positive effect on the performance static intel Linking link Intel provided libraries statically This option is recommended This has the nice effect that the executable now can be safely transferred from the compile node where the Intel libraries are available to any of the
148. diag f E15 8 b 4 amp n Diagonal factor for viscous stress tensor u 1 amp c0 typically 1 0 1 0 7 1 PARAMETER FILE RHD PAR 135 This is not really parameter one would try to adjust The total amount of viscosity should be con trolled with parameters like real c_vissmagorinsky and real c_visartificial But the parameter can be used to tentatively switch off the diagonal terms completely or to change its importance compared to the other terms 7 1 11 8 real c_vistensoroff The factor in the stress tensor in front of of the off diagonal terms can be set with e g real c_vistensoroff f E15 8 b 4 amp n Off diagonal factor for viscous stress tensor u 1 c0O typically 0 5 0 5 This is not really parameter one would try to adjust The total amount of viscosity should be con trolled with parameters like real c_vissmagorinsky and real c_visartificial But the parameter can be used to tentatively switch off the off diagonal terms completely or to change its importance compared to the other terms 7 1 11 9 real c_vistensordiv The factor in the stress tensor in front of of the divergence terms also on the diagonal can be set with e g real c_vistensordiv f E15 8 b 4 amp n Divergence factor for viscous stress tensor u 1 cO typically 1 3 0 0 This is not really parameter one would try to adjust The total amount of viscosity should be con trolled with parameters like real c_vissmagorinsky and real c
149. diation pressure on dust has to be taken into account 7 1 12 1 character dustscheme A scheme for dust or molecule formation and transport can be selected e g with character dustscheme f A80 b 80 n Dust model amp cO none default nosource dust_simple_01 co_component01_01 amp c1 dust_k3mon_01 dust_k3mon_02 dust_k3mon_01 The following values are currently possible e none None No handling of any dust molecule density at all e nosource Skip source term step for dust molecules entirely but do the transport e dust_simple_01 Simple and unrealistic dust formation model only for testing of the numerics e co_component01_01 Simple CO formation from Matthias Steffen with one component only but realistic time scales e dust_k3mon_01 Simple C rich dust formation routines from Susanne H fner with one component only but realistic time scales e dust_k3mon_02 Simple C rich dust formation routines from Susanne H fner with two compo nents for dust density and free carbon density e dust_k3mon_03 Simple forsterite dust formation based on routines from Susanne H fner with two components for dust density and free forsterite monomer density e dust_bins_01 Multi size bin forsterite dust formation based on Rossow s equations see Rossow 1978 with one bin for the monomers and several bins for the different grain sizes e dust_moment04_c2 C rich dust chemistry 4 moments routines from Su
150. dim_chu2 outdim_chu3 plustimestep starttimestep 151 luminosity 108 MHD 116 130 molecules opacities process management 150 radiation transport reading in IDL character top_bound_mag chemical reaction network dust effective temperature 103 equation of state 114 fileform uio 102 gravity 103 header 102 hydrodynamics hydrogen ionization 137 input output integer dtimestep_out_fine 163 integer endtimestep 152 integer hion_chunks 139 integer istep_in_start lo8 real abux 162 real real real real real real real real real real real real real real abuy 162 ar_dustgrainradius ar_RotationAxis 105 b1_inflow 14 beta_inv 132 c_magthetab c_radkappasmooth c_visp2pdivrhov 136 c_visp2phypartificial 136 c_visp2phypexpansion 136 c_visp2phypsmagorinsky 135 c_coredrag 111 c_courant 153 c_courantmax 153 INDEX real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real real c_dust01 140 c_dust02 140142 c_dust03 140142 c_dust04 140 142 c_dustob 141 c_dust06 c_dust07 c_dust08 c_dust09 c_dustOX c_gravmu chem_abumetal 138 c_hptopfactor
151. dynamics iterations c0 10 8 For a simulation of a solar type star it will typically be set to 1 E g for brown dwarfs with shorter hydrodynamical time scales values around 10 may be considered Note that the hydrodynamics iteration works somewhat differently than the radiation transport iteration in the latter case the size of the actual time step can be determined after computing the fluxes whereas the hydrodynamics step is possibly of at least second order in time and the time step has to be known in advance In the case of the MHD module this can reduce the computation time significantly because the MHD time step is often much smaller than the other timestep limits However this parameter does not determine the nuber of substeps directly Instead the number of substeps is determined by the requested timestep and the timestep of each MHD substep which is determined by the standart Courant condition So the number of MHD substeps varies during the simulation So the exact value of this parameter has no direct influence on the number of substeps If this parameter is set to zero this features is turned of See also parameter va_max for speeding up MHD simulations 7 1 8 7 integer n_hydmaxiter The absolute maximum number of hydro iterations can be specified e g with integer n_hydmaxiter f 14 b 4 amp n Maximum number of hydro iterations c0 14 0 If more iterations are needed the computation for the current time step is stoppe
152. e kkkkkkkkkkkkkkkkkk subroutine rhd_hyd_SwitchInfo ncp NAME rhd_hyd_SwitchInfo rhd_hydrodynamics_Switch_Information PURPOSE Print information about used compiler switches CATEGORY Hydrodynamics CALLING SEQUENCE call rhd_hyd_SwitchInfo ncp INPUT L nep number_channel_print integer with output channel number usually 6 OUTPUT None LOCAL VARIABLES ROUTINES None MODULES None SIDE EFFECTS Write to requested output channel RESTRICTIONS If another compiler switch is used anywhere in the module it has to be explicitly included in this routine PROCEDURE 5 5 COMPILER SWITCHES AND DIRECTIVES 81 Just print the value of all compiler switches used for the module EXAMPLE call rhd_hyd_SwitchInfo 6 MODIFICATION HISTORY 2002 08 12 B F Written implicit none l I O parameters integer intent in ncp Local variables character len parameter defstr defined undefstr undefined l SAA E en E E a ag a en en A E write ncp A Compiler switches rhd_hyd_module 00 e ee enen 4 write ncp A 16 rhd _hyd_gravcorr_p01 rhd_hyd_gravcorr_p01 write ncp A I6 rhd _hyd_entropyfix_p01 rhd_hyd_entropyfix_p01 write ncp A I6 rhd
153. e tar zxvf for tar gz cd for hd rhd mkdir p UNIT_TESTS_ON_YOUR_MACHINE cd UNIT_TESTS_ON_YOUR_MACHINE In s conf configure export F90_UNIT 1 configure make UT echo e rhdut exe The trickery with echo causes colored output that is activated by default to be properly displayed So far the coverage of the unit tests is microscopic i e a successful unit test run does not tell much about the correctness of the entire code While the coverage will hopefully increase with time there is no intention to try to cover higher level modules or the entire code Such tests are and will be made with normal test runs of the entire code hopefully better automated in the future 5 6 1 F90 UNIT Specify which unit test modules should be activated e 0 Don t activate any unit test modules This is the default for normal code compilation and does not make much sense for actual unit testing e 1 Activate all unit unit test modules e rhd_ baseradUT module Activate this module e rhd_meanUT module Activate this module e rhd_recUT_module Activate this module e rhd_baseradUT_module rhd_meanUT_module Activate these two modules this is an example any combination is possible Chapter 6 Data file types 6 1 File overview Table 6 1 shows a list of all files necessary to run CO5BOLD Figure 9 1 gives similar information but is not quite up to date Executing the Makefile produces an executable rhd e
154. e Values e 0 3D array single loop scheme old default e 1 1D array single loop scheme e 2 3D array three loop scheme default e 3 1D array three loop scheme 4 4 5 Hydrodynamics Roe solver 4 4 5 1 rhd_hyd_gravcorr_p01 rhd hydrodynamics gravitation correction parameter 01 in rhd_hyd_module F90 Category selection of approximation This parameter controls the way the Roe solver handles the source terms due to gravity A different choice results in different simulation results and not just in slightly faster or slower code The problem is that the original Roe solver interpretes the pressure gradient in a hydrostatic stratification a fluctuation due to shock waves In case of strong stratification this can lead to weird effects With activated correction the Roe solver treats only the deviations from a hydrostatic stratification as due to waves or shocks Several correction formulas have been tried The latest is the recommended default Values e 0 No pressure correction terms in Roe solver e 1 Simple correction with rhomean no new average pressure 46 CHAPTER 4 COMPILATION amp INSTALLATION e 2 Simple correction with rhomean new average pressure e 3 Correction with local rho limited new average pressure e 4 Correction with local rho new different formula average pressure e 5 default Correction with local rho new limit new average pressure e 6 Modification of 5 with different geometry fac
155. e HD module also apply for the MHD mod ule A few parameters have somewhat different options for both modules hdtimeintegrationschene Sect 7 1 8 2 hdsplit Sect 7 1 8 3 character reconstruction Sect 7 1 8 4 Several parameters have meanings only for the HD see Sect 7 1 9 or the MHD module see Sect 7 1 10 and are ignored in the other one hdScheme hdTimelntegrationScheme hdSplit Ccourmax CsndCourMax comment Roe Single 123 1 old default Roe Single unsplit 1 D don t use Roe Single CTU 1 1 2 for D 3 recommended default Roe RungeKutta2 unsplit 1 D small Mach number flow Roe RungeKutta3 unsplit 1 D HLLMHD Hancock 123 zl recommended default HLLMHD Hancock unsplit 1 HLLMHD RungeKutta2 unsplit 1 D HLLMHD RungeKutta3 unsplit 1 D Table 7 1 List of reasonable combinations of options for HD and MHD solver The columns are the type of the M HD scheme see Sect 7 1 8 1 the time integration scheme see Sect 7 1 8 2 the directional splitting method see Sect 7 1 8 3 the maximum Courant number where D is the dimension of the computational box see Sect 7 1 20 6 the maximum sound Courant number where D is the dimension of the computational box only specified for the case where it is actually a new constraint in addition to the normal Courant condition see Sect 7 1 20 9 and a comment 7 1 8 1 character hdscheme With this parameter the type of the hydrodynamics scheme can be specified as in
156. e IS 90 a Aa he ee 116 E Ln 144 15 16 LIST OF TABLES Chapter 1 Introduction CO5BOLD nickname COBOLD is the short form of COnservative COde for the COmputation of COmpressible COnvection in a BOx of L Dimensions with 1 2 3 It is used to model solar and stellar surface convection Freytag et al 2012 For solar type stars only a small fraction of the stellar surface layers are included in the computational domain Wedemeyer et al 2004 In the case of red supergiants or AGB type stars rete EM ytag amp Hofner 2008 the computational box contains the entire star The model range has been extended to sub stellar objects like brown dwarfs Freytag et al 2010 and to white dwarfs Tremblay 2013 CO5BOLD solves the coupled non linear equations of compressible hydrodynamics in an external gravity field together with non local frequency dependent radiation transport Operator splitting is ap plied to solve the equations of hydrodynamics including gravity the radiative energy transfer with a long characteristics or a short characteristics ray scheme and possibly additional 3D turbulent diffu sion in individual sub steps The 3D hydrodynamics step is further simplified with directional splitting usually The 1D sub steps are performed with a Roe solver 1986 accounting for an external gravity field and an arbitrary equation of state from a table The radiation transport is computed with either one of thr
157. e boundary layer amp c0O 0 gt deactivates this feature amp ci 10 reasonable value 7 1 10 12 integer n_magdifftop Increases the diffusivity of the scheme near the top boundary within a thickness of the diffusion layer of N_magDiffTop computational cells Example integer n_magdifftop f 19 b 4 amp n Number of cells of diffusive top boundary layer amp c0O 0 gt deactivates this feature ci 10 reasonable value 7 1 PARAMETER FILE RHD PAR 133 7 1 10 13 integer n_magdiffbottom Increases the diffusivity of the scheme near the bottom boundary within a thickness of the diffusion layer of N_magDiffBottom computational cells Example integer n_magdiffbottom f 19 b 4 amp n Number of cells of diffusive bottom boundary layer amp c0 0 gt deactivates this feature amp ci 10 reasonable value 7 1 11 Tensor viscosity control In most test problems it is not necessary to activate the 2D 3D tensor viscosity anymore Even when strong slow shock fronts are aligned with the grid the Roe solver does not run into problems anymore even without any additional 2D or 3D viscosity However even if the Roe solver can handle sharp shocks by its own the radiation transport algorithm might cause trouble because of the enormous opacity variations across a shock front Here the tensor viscosity might become useful In fact there are two separate tensor viscosity routines by now The clas
158. e chosen This parameter can be specified but there is no corresponding output file in CO5BOLD yet 7 2 Input model file rhd sta A start file has the same structure as an end file or a full file containing only one snapshot see Sect 8 1 7 3 EOS file The equations of state is provided via a table in UIO format see Sect 7 1 6 7 4 Opacity file The opacity data is provided via an ASCII table see Sect 7 1 7 7 5 Chemistry input The number densities of the chemical species must be provided as cell centred quantities que in cm see Sect 4 4 1 6 The array UIO headers must be named following this example Number density of H2 The chemistry input file contains all data for the reaction network It is a text file with a strict format following the UMIST 99 ratefile standard FORMAT 14 5 A8 1X 2 1X A4 1X 1PE8 2 3X 0PF5 2 2X 0PF8 1 A16 It consists of 12 columns with the following meaning 7 6 HION INPUT 165 col meaning format 1 reaction ID 14 2 4 reactants max 3 symbols with 8 characters 3 A8 1X 5 8 products max 4 symbols first two with 2 A8 1X 2 1X A4 8 characters last 2 with 4 characters 2 A8 1X 2 1X A4 9 reaction coefficient a 1PE8 2 10 reaction coefficient P OPF5 2 11 reaction coefficient y OPF8 1 12 reference A16 The symbols are usually the chemical symbols of the involved species e g C for carbon The present species are recognised automat
159. e dataset in the start model file to be used can be specified e g with integer istep_in_start f 14 b 4 n Number of dataset to read as start model amp u 1 cO 1 first dataset default 2 second dataset 1 7 1 21 10 character outfile end The file name for the final model can be specified with e g character outfile end f A80 b 80 n Output file name rhd end The default is rhd end Leaving it empty means that no final model is written This of course inhibits follow up simulations but can be useful to save time and disk space for some tests 7 1 21 11 character outfile full The name of the file for the output of additional full models at regular intervals see Sect 8 1 can be given with e g character outfile_full f A80 b 80 n Output file name rhd full Leaving it empty means that no file of this type is written 7 1 21 12 character outfile mean The name of the file for the output of additional information average stratification 1D mean fluxes 1D surface intensities 2D at regular intervals see Sect 8 3 can be specified with e g character outfile_mean f A80 b 80 n Output file name rhd mean Leaving it empty means that no file of this type is written 7 1 21 13 character outfile_mcyl The name of the file for the output of azimuthal averages 2D arrays for 3D models at regular intervals see Sect 8 3 can be specified with e g character outfile_mcyl f A80 b 80 n Output f
160. e small fluctuation treatment towards larger fluctuations This can can result in a nicer entropy profile but might be unstable e 1 0 Default e 0 5 1 0 2 0 5 0 Reasonable values e gt 1 0 Extend the large fluctuation treatment towards smaller fluctuations This improves stability but leads to artefacts in the entropy stratification under near adiabatic conditions 7 1 9 7 real c slopered A new extra stabilization mechanism can be activated that reduces the slope and flattens the reconstruc tion function in case of a strong density contrast Poneside Potherside gt 2 between neighboring cells This value can be set e g with real c_slopered f E15 8 b 4 amp n Slope reduction parameter in case of strong density contrast u 1 amp c0 0 00 off default 0 02 reasonable value 0 10 large value 0 02 Typical choices are e 0 0 Slope reduction switched off Original reconstruction is used e 0 02 Moderate slope reduction in case of large density jumps e 0 10 More pronounced slope reduction in case of strong density contrast 124 CHAPTER 7 INPUT AND CONTROL FILES The default is not to use this trick and leave the parameter at 0 0 However if numerical problems occur close to strong density jumps one can try to cure them by setting it e g to 0 02 or so One could even think off other criteria e g low temperatures very high Mach numbers to activate this slope reduction That could be implemented if it wou
161. e values are e 2 default The standard predictor corrector 2nd order Runge Kutta step number Cost 2 advance 1 C_hydSoundCourantMax 1 3 0 333 e 3 Typical recommended value Cost 3 advance 2 C_hydSoundCourantMax 1 3 3 2 1 3 0 381 e 5 Rather large still sensible value Cost 5 advance 4 C_hydSoundCourantMax 1 3 5 4 1 3 0 358 7 1 9 4 real c_hydlowmachcsfactor For very low Mach numbers the over sensitive sound wave detection of the Roe solver for 2D and 3D cases can be suppressed by choosing a non zero value for real c_hydlowmachcsfactor This is in fact a tiny modification of the Roe solver but changes its behavior significantly and requires for C_hydLowMachcsFactor gt 0 0 hdsplit unsplit and hdtimeintegrationscheme RungeKutta2 or hdtimeintegrationscheme RungeKutta3 The value can be set e g with real c_hydlowmachcsfactor f E15 8 b 4 amp n Low Mach Number sound speed reduction parameter amp c0 lt 0 0 off old settings recommended default amp ci 1 0 small value 2 0 reasonable value 5 0 large value 2 0 Typical choices are e 0 0 The extra reduction factor is not applied This is the standard Roe scheme It is still the recommended default excepd for very low Mach number flows e 1 0 Smallest meaningful value to switch on the reduction e 2 0 Reasonable value e 5 0 Rather large value The default is not to use this reduction and leave the parameter at 0 0 However the im
162. ed to an equidistant grid and open boundaries at all surfaces Note that the switch Drhd_r01 1 has to be set during compilation see Sect 4 4 7 1 usually by setting export F90_LHDRAD 1 before calling the configure script see Sect 4 3 1 8 e MSrad solar module local models box in a star models It uses long characteristics The lateral boundaries have to be periodic Top and bottom can be closed or open Note that the switch Drhd_r02 1 has to be set during compilation see Sect 4 4 7 2 usually by setting 4 3 1 9 export F90_MSRAD 1 before calling the configure script see Sect e SHORTrad new supergiant module global models star in a box models It uses short char acteristics and is restricted to an equidistant grid and open boundaries at all surfaces Note that the switch Drhd_r03 1 has to be set during compilation see Sect 4 4 7 3 usually by setting export F90_SHORTRAD 1 before calling the configure script see Sect 4 3 1 10 7 1 16 2 integer n radband It can be specified whether the grey opacity table or the binned frequency dependent part of the opacity table is used during the computation The grey part contains only one bin The other possibly non grey contains one or more bins depending on the table chosen The parameter is specified with e g 7 1 PARAMETER FILE RHD PAR 145 integer n_radband f 14 b 4 n Number of frequency bins amp c0 1 grey opacities amp
163. ed with the parameter real c_radtcool f E15 8 b 4 amp n Surface cooling u 1 amp c0O 0 0 default 0 0 7 1 17 9 real c_raddcool Parameter for surface cooling option N_radband lt 0 of MSrad It can be activated with the parameter real c_raddcool f E15 8 b 4 amp n Surface cooling u 1 amp c0 0 0 default 0 0 7 1 17 10 real c_radscool Parameter for surface cooling option N_radband lt 0 of MSrad It can be activated with the parameter real c_radscool f E15 8 b 4 amp n Surface cooling u 1 amp c0O 0 0 default 0 0 7 1 17 11 real c_radtinci Temperature of black body that emits incident radiation default 0 0 MSrad only It can be used e g with real c_radtinci f E15 8 b 4 amp n Temperature of black body that sends incident radiation u K amp c0O 0 0 default 0 0 150 CHAPTER 7 INPUT AND CONTROL FILES 7 1 17 12 real c_raddinci Dilution factor R d of black body that emits incident radiation default 0 0 MSrad only It can be used e g with real c_raddinci f E15 8 b 4 amp n Dilution factor of black body that sends incident radiation u 1 amp c0O 0 0 default 0 0 7 1 18 Radiation transport control LHDrad only 7 1 18 1 real c_radtvisdtau Using the LHDrad module the limit in delta optical depth rho kappa dx below which the radiative temperature viscosity temperature smoothing is to be applied can be set with e g
164. ee modules e MSrad module It uses long characteristics The lateral boundaries have to be periodic Top and bottom can be closed or open solar module e LHDrad module It uses long characteristics and is restricted to an equidistant grid and open boundaries at all surfaces old supergiant module e SHORTrad module It uses short characteristics and is restricted to an equidistant grid and open boundaries at all surfaces new supergiant module The code was supplemented with an optional MHD version Schaffenberger et al 2005 that can treat magnetic fields There are also modules for the formation and advection of dust available The current version now contains the treatment of chemical reaction networks mostly used for the formation of molecules Wedemeyer Bohm et al 2005 and hydrogen ionization Leenaarts amp Wedemeyer Bohm 2005 too CO5BOLD is written in Fortran90 The parallelization is done with OpenMP directives To get a brief overview the Quickstart Sections might be helpful How to compile CO5BOLD Sect 4 1 Introduction to the UIO data format Sect 6 2 1 How to make a proper parameter file Sect 7 1 1 How to run COSBOLD Sect 9 1 17 18 CHAPTER 1 INTRODUCTION Chapter 2 Equations 2 1 Basic equations The hydrodynamics equations are expressed as conservation relations plus source terms for p pul pu2 pv3 peikg 2 1 the mass density
165. eid_step_t01 undefined defined defined defined See Sect 4 4 for more information about the meaning of the values The reading of the parameter file starts with ACTION Read parameter file lt lt lt lt lt lt lt lt After a parameter is read its value is printed see Sect 7 1 The line ACTION Load EOS data lt lt lt lt lt lt lt lt indicates the start of the reading of the equation of state data It is followed by some information about the EOS table in use Similarly the line ACTION Load opacity tables lt lt lt lt lt lt lt lt indicates the start of the reading of the opacity data The information that follows is taken directly from the header of the opacity table Currently the last file to be read is the start model which is announced by ACTION Read start model lt lt lt lt lt lt lt lt and followed by some information about the start model e g the number of grid points and a new section showing the quantities actually read e g Properties of start model time time xci xc2 XES xb1 xb2 xb3 de ql x2 x3 ved X2 x3 coordinates coordinates coordinates coordinates coordinates coordinates of of of of of of cell cell cell cell cell cell centers centers centers boundaries boundaries boundaries s cm cm cm cm cm cm 176 CHAPTER 8 OUTPUT AND STATUS FILES rho Density g cm 3 ei Internal energy
166. el entry for file structuring Table 6 3 UIO entry types keyword description example descriptor info necessary b byte number 4 format yes d dimension 0 9 format yes arrays ds dimension shift 1 1 yes f Fortran format E13 6 format yes p values per line 4 format yes arrays t transformation log10 format n name density yes u unit g cm 3 yes date date 1 1 98 yes c0 9 comment Dichte yes form file format formatted file yes file header convert conversion ieee_4 file yes file header version version 0 1 1997 11 29 yes system system TRIX yes machine machine name atlas yes osrelease OS release 6 3 yes osversion OS version 12161207 yes hardware machine hardware IP32 yes language program language Fortran90 yes program program ulotst yes XYZ user defined source yes Table 6 4 Standard UIO entry header keywords The keyword is given with a short description and an example The fourth fifth and sixth column indicate if the keyword is a mandatory descriptor in the file header or for the format of an entry or if it gives only additional information and is optional and therefore not necessary to specify In an unformatted file each header line is an individual record containing a string with exactly 80 char acters The following data block scalar or array is one single record In a formatted file each header line is a string of at most 80 characters delimited by a LINEFEED of whatever the operating system decided to be appropr
167. ellar time span this value can be set e g with real plustime f E15 8 b 4 n simulation advance time u s 5 0E 07 A value lt 0 0 cancels this halt condition it is not checked at all This condition assures if it is the only one that all individual simulation runs cover approximately the same stellar time 7 1 19 7 integer endtimestep If the simulation should run up to a certain time step its values can be specified e g with integer endtimestep f 111 b 4 n total simulation time step number u 1 1234 This might be useful to advance the simulation up to a point shortly before a previous simulation crashed A value lt 0 cancels this halt condition it is not checked at all 7 1 19 8 integer plustimestep If the initial model should be advanced by a certain number of time steps their number can be set e g with integer plustimestep f 111 b 4 n simulation advance time step number u 1 2000 A value lt 0 deactivates this halt condition it is not checked at all 7 1 20 Time step control In this group parameters to control the time step restrictions can be set They are important because decide about performance and stability of CO5BOLD They should be tested and adjusted for a simulation of a new type of object But all the dimensionless parameters can stay unchanged for a group of similar simulations Only the parameters with an explicit time dimension should be checked in all cases they scale with character
168. eme cases solar models look fine with PP The newest options are HBweno and VAweno which are closer to standard WENO schemes The options Constant SuperBee and FRcont are just for testing purposes they have either too much sometimes the wrong sign of or too little diffusion respectively The order of decreasing diffusivity and increasing accuracy is roughly schemes on a line are similar schemes in brackets are for testing only Constant MinMod FRmimo PPmimo vanLeer FRmono FRweno HBweno Superbee PP VAweno FRcont However there are differences how the increase in accuracy is achieved vanLeer uses potentially danger ous anti diffusion in contrast to MinMod but needs only a 3 point stencil whereas PPmimo and FRmimo don t have anti diffusion but need a more expensive 5 point stencil FRweno achieves actually a 2nd order accurate reconstruction also near extrema for reasonably resolved structures e g sufficiently long wavelengths of sine waves I e it gives up strict monotonicity whereas PP is strictly monotonic and achieves low dissipation from avoiding jumps at cell boundaries wherever possible However it chops off flattens extrema like all TVD schemes and it shows Gibbs wiggles near a jump that is not surrounded by constant plateaus but lies in a slope The 2nd order scheme FRmono is designed to suppress these wiggles too The highest resolution schemes are PP implemented in the MHD module too a
169. en Routine bound3d_inoutflow added 2014 08 17 B F Use global boxes for working copies 2014 12 02 B F Remove rhd_roe1id_step_101 0 option The description of modules routines and functions should start at column 27 unless the name is too long 5 4 3 Header of subroutines and functions rhd_bound_3DTransmit rhd_boundary_conditions_3_Dimensions_Transmit PURPOSE Adjust density values in top cells to contribute to the open upper boundary condition CATEGORY Hydrodynamics CALLING SEQUENCE call rhd_bound_3DTransmit model action dtime INPUT action action derived type with collection of control parameters dt ime delta time real time step to be used INPUT OUTPUT model model derived type model data rho ei v x time OUTPUT LOCAL VARIABLES ROUTINES 78 eosinter MPI_AllReduce MPI_Comm_Split MODULES rhd_gl_module rhd_action_module rhd_box_module rhd_prop_module gasinter_module MPI SIDE EFFECTS RESTRICTIONS CHAPTER 5 PROGRAMMER S GUIDE Solve EOS by bicubic interpolation rho e gt P dPdrho dPde T dTde s Perform a reduction and send result to all processes Split a communicator Global type definitions and parameters for RHD Routines to handle the control structure action Box handling routines Properties of quantities in box structure Routines for interpol
170. ery change in the control variables With e g export F90_MACHINE dummy export F90_PREFLAGS Oprettyfast Qsomethingelse configure it is possible to specify all machine dependent settings yourself see Sect 4 3 1 16 and Sect 4 3 1 3 This is useful when dealing with a compiler hitherto unknown to the configure script 9 Start the compilation with make to produce the executable rhd exe Symbolic links are created that point from the current directory to each source code file needed to compile CO5BOLD in its requested configuration A simple sample installation might look like the following the sub directory for is put directly into the home directory Choose the base directory cd HOME Put the tar file there Ho Expand the tar file tar zxvf for tar gz Go into default master directory cd for hd rhd YOUR_MACHINE Activate OpenMP und MSrad radiation transport export F90_PARALLEL openmp export F90_MSRAD 1 Start the configure script to produce the Makefile configure Compile using the Makefile make echo Voila 4 3 CONFIGURE SCRIPT 37 If you want to compile in a directory in a completely different place not in a sub directory of for as described above you have to set the environment variable F90_BASEPATH see Sect 4 3 1 17 to make the paths to the source files known to the configure script That might look like mkdir SO
171. es eosfile Sect 7 1 6 1 opafile Sect 7 1 7 1 Check the paths eospath Sect 7 1 6 2 and opapath Sect 7 1 7 2 e boundary conditions 5 If the gravity of the new model and therefore the characteristic length and time scales signifi cantly deviate from the values of the old one some values have to be scaled accordingly 101 102 CHAPTER 7 INPUT AND CONTROL FILES e the time specifications controlling the output frequency dtime_out_full dtime_out mean e the total length of the simulation if specified as stellar time endtime plustime e absolute boundaries for the time step dtime_min dtime_min stop dtime max dtime_start e some radii for global models e some scale length for some boundary conditions Look for parameters with units u s or u cm see Sections 7 1 20 and 7 1 21 6 The rest of the parameters controls additional details Most of the constants are specified in dimensionless form and keep their value in a class of related simulations The previously used values will probably be reasonable for the new simulation too However if typical Mach numbers or ratios of radiative to advective time scales change significantly also the values of the dimensionless parameters should be checked Of course a complete control of CO5BOLD is only possible after studying of the meaning of the parameters in detail e g by reading the following pages AND unfortunately an accompanying look into the
172. es do not contain any OpenMP directives However this means that OpenMP can be safely deactivated for these modules A proposed compiling sequence was export F90_COMPILER ifort export F90_MSRAD 1 export F90_PARALLEL scalar configure make UIO export F90_PARALLEL openmp configure make With more recent compiler version this is much simpler A realistic example with several modules activated with an explicit choice if optimization flags might look like export F90_COMPILER ifort export F90_MSRAD 1 export F90_SHORTRAD 1 export F90_MHD 1 export F90_PARALLEL openmp export F90_OPTIMIZE ipo 03 xHost static intel W Drhd_box_arrays01 1 export F90_POSTFLAGS Drhd_hyd_gravcorr_p01 6 Dtiming_c_range 15 Dtiming_r_type 7 configure c make For OpenMP see Sect 4 5 1 the number of threads can be set for instance with 64 CHAPTER 4 COMPILATION amp INSTALLATION export OMP_NUM_THREADS 16 for a machine with 16 threads e g 2 processors 4 cores per processor 2 threads per core With export OMP_NUM_THREADS cat proc cpuinfo grep processor wc 1 the number of OpenMP threads is determined from the number of logical processors Experimenting with the scheduling e g by setting export OMP_SCHEDULE DYNAMIC 1 or export OMP_SCHEDULE GUIDED 2 or most often just export OMP_SCHEDULE STATIC might improve the performance see Sect 4 5 1 The last two OpenMP variables are recognized by
173. f the simulation and a smooth restart Before the restart the rhd stop file has to be deleted The simulation can be continued by just initiating a new run If the file rhd cont exists at the beginning of a simulation the code tries to resume an interrupted computation The initial model will not be taken from the start model file infile_start but from the final model outfile_end The data for the full and the mean file is not written into new files but will be appended to the existing ones In this way a simulation can be interrupted and continued in a fairly safe way It is possible to analyze the final model and to changes values in the parameter file Keep in mind that after a restart with rhd cont the specifications about the length of the job e g the number of time steps will be counted from the restart point and not from the beginning of the original simulation To interrupt a job with rhd stop can be very handy The continuation with rhd cont and the old parameter file is not to be preferred over an ordinary restart with a new parameter file At the beginning of every time step COSBOLD checks in the working directory whether the file rhd dump exists If it has been generated e g with touch rhd dump and the file rhd snap does not exist the current model is written into rhd snap It has the same file properties format and conversion as the regular rhd end file The run of the simulation itself is not modified This feature might be usef
174. format the standard for UIO files are automatically transformed to little_endian and vice versa e 03 General optimization flag In the preprocessor switches are listed that control the modern single version uio_mac_module F90 OpenMP is not there yet The binary I O format unformatted is incompatible with the one used before in CO5BOLD no existing binary UIO files can be read 4 6 11 Linux GNU gfortran compiler The Fortran compiler of the GNU project is called with gfortran See for some recom mendations of options There is a full list of Optimize Options available Important switches are e fconvert big endian frecord marker 4 With this flag set binary files in big_endian format the standard for UIO files are automatically transformed to 1ittle_endian and vice versa In addition the old 32 bit record marker convention is maintained and existing UIO files can be read e 03 General optimization flag e fopenmp Activates the OpenMP directives e fdefault real 8 fdefault double 8 Useful to force compilation in double precision see 4 5 5 In the preprocessor switches are listed that control the modern single version uio_mac_module F90 of the UIO module The scalar code is slower than code compiled e g with the Intel compiler see Sect 4 6 8 However the factor is not prohibitive For not too demanding runs the gfortran compiler can be useful 4 6 12 NEC SX 5 SX 6 SX 8 First attemp
175. formatted conv ieee_4 tor native crayxmp 6 ei call uio_openwr ncout file form form conv conv Header and data block are written together with one command as e g in call uio_wr ncout time time name time unit s call uio_wr ncout rho 1 10 rho name density unit g cm 3 There are two different routines to close a file after reading or writing A file opened for writing is closed by call uio_closwr ncout To open a file for reading only the file name has to specified File form and conversion type are determined automatically file test txt call uio_openrd ncin file In contrast to the writing of an entry by one routine call the reading is performed in two separate sub steps for the header and the data part After the reading of the header e g with use uio_siz_module use uio_nam_module integer se Gt character let termt 2 nttmx call uio_rdhd ncin termt ntt the identifier type and dimension if any of the entry is contained in the character array termt with ntt entries and special actions may be taken The data part may be skipped with 6 2 UIO DATA FORMAT 93 uio_skipda ncin termt ntt or it can be read with call uio_rd ncin termt ntt time ident If the entry is an array it may be necessary to allocate memory call uio_exkeyw termt ntt dimna dimstr call uio st2dim dimstr ilow iup ndim ndim allocate rho ilow 1 iup 1
176. g for hd rhd and for hd mhd or just one as e g for uio f90 that contain the actual Fortran files Although a few ancient subroutines still use the FORTRAN fixed format for newer code parts the Fortran free format is strongly recommended Subroutines functions type definitions global data etc should be collected in modules Typically there is one module per file with some exceptions Standard Fortran statements and commands if then subroutine is written in lower case Preprocessor directives e g ifdef are written in lower case OpenMP declarations and compiler directives are written in upper case Names of variables subroutines and modules can use CamelCase and underscores Implicit type declarations should be avoided although there is still the tendency to start integer variables with i m or n Instead all type declarations should be preceded by implicit none which enforces an explicit type declaration of all variables All quantities are measured in cgs units 5 2 Indentation and spaces 5 2 1 General layout and indentation recommendations Lines should be limited to a maximum of 101 characters if anyhow possible That ensures that an editor window with this width does not wrap or cut lines The version of the CO5BOLD manual that includes the source code cannot display much more than 100 characters in a line The code should be carefully indented Each indentation level shifts the text by 2 spaces to
177. given by ss 2 11 T The change in optical depth Ar along a path with length Ax is than AT Rp 2 12 The variation of the intensity J with optical depth 7 along a ray with orientation 0 p can be described by the simple differential equation dI I 2 1 dr Pa 2 13 The radiative energy flux is given by 27 T Fea 1 Icos sin d dy 2 14 0 0 The energy change can than be computed from the flux divergence with Opei OF x1 rad OF x2 rad OF 73 rad Qrad 2 2 2 1 Ot Qrad 0x1 0x2 0x3 210 2 2 Magnetohydrodynamics W Schaffenberger The MHD module solves the equations of ideal MHD given in compact vector form Op Ot Me pv 0 gt B B v ow P 22 1 BB g E 2 16 DE V vB Bv 0 Opetot B B E V perot P v v B B Fna 0 Here B is the magnetic field vector where the units are such that the magnetic permeability y is equal to one I is the identity matrix and a b gt gt a b the scalar product of the two vectors a and b The dyadic tensor product of two vectors a and b is the tensor ab C with elements Cmn ambn and the nth component of the divergence of the tensor C is V C X m 0 mn OXm The total energy is given by petot pei 4 Pp p 2 17 where ei is the internal energy per unit mass The additional solenoidality constraint V B 0 2 18 must also be fulfilled The aim was to create a stable and easy to use module
178. h special handling for conversion type Table 6 7 Contents of uio_mac module In the current version of CO5BOLD there is only one file uio_mac_module F90 with a capital F90 that can be changed during the compilation by preprocessor switches see 4 4 2 The main set of routines is contained in uio_bulk_module f90 in the module uio_bulk_module The three files uio_base_module f90 uio_mac_module F90 and uio_bulk_module f90 comprise the standard set of UIO routines Additionally there exists a file uio_table_module f90 with the single module uio_table_module which permits the I O and manipulation of a certain table format see the example in section 6 2 2 The latest extension comes within the modules uio_var_module f90 and uio_varfile_module f90 The module uio_var_module f90 contains a type definition for a variable uio flexible variable of gen 6 2 UIO DATA FORMAT 91 eral type i e it may be a scalar integer value or a 1D character array or a 3D real array together with some routines for the basic handling of the variables I O in UIO format construction and modification of variables The module uio_varfile_module f90 contains a type definition for a file built of UIO flexible variables together with routines for the handling of these files 6 2 5 2 Use of UIO modules in Fortran90 To make the UIO routines available in a Fortran program the appropriate modules have to be specified in a USE statement A
179. has to be specified The native conversion type is the internal binary data representation which is also standard for unformatted Fortran output If this representation happens to be conformal with the IEEE standard the conversion type ieee 4 should be used It gives the same data format but in the header of the file the term convert ieee 4 instead of convert native describes the data format precisely in a way also understandable by other machines On CRAY machines the native format is equal to the conversion type crayxmp_8 but also 86 CHAPTER 6 DATA FILE TYPES the conversion types ieee 4 and ieee_8 can be chosen The last two conversion types correspond to the CRAY internal types ieee_32 and ieee_64 respectively On a machine with an internal data representation not within the list in the existing uio_mac_module F90 file one could use the native conversion type only But it is better to invent an appropriate name for the new data format and to build a proper machine dependent branch with its own compiler switch However it was possible in all cases so far to activate some internal conversion process which allowed the handling of UIO files in the standard Big Endian IEEE format conversion type I R D description native _ internal data format on all machines sometimes useful but not recommended ieee_4 4 4 8 standard IEEE big_endian format recommended ieeele_4 4
180. hat all operations can be performed in the command line of IDL This allows an interactive processing of CO5BOLD data Moreover there are already prepared IDL scripts for this purpose but most of them are rather complex and still have to be edited e g changing file names Huuhh For the beginning it is more clear to use single commands We give a short overview of some essential commands 10 2 1 Loading the parameter file IDL gt parfile mymodel par IDL gt par uio_struct_rd parfile All control parameters are provided in the structure PAR 185 186 CHAPTER 10 DATA ANALYSIS WITH IDL 10 2 2 Loading CO5BOLD data full sta end chul IDL gt modelfile home user mymodel full amp n 0 IDL gt ful uio_dataset_rd modelfile n n First the name and full path if not in the actual directory of the model file and the wanted time step should be defined Here time step means the consecutive number of the model snapshot in the file Declaring a time step number greater than the number of snapshots contained in the file will cause an error Otherwise all data of the particular time step n will be provided in the structure FUL Loading more than one timestep from the same file could be achieved as follows IDL gt uio_openrd nc modelfile outstr ierr IDL gt for i 0 ntime 1 do begin amp IDL gt ful uio_dataset_rd modelfile channel nc ierr ierr outstr err_msg amp IDL gt endfor IDL gt uio_closrd nc
181. he HION module can produce two types of output The first is the standard output of the quc arrays in the full and end files holding the level populations This is all that is needed to restart a computation The second optional output is a HION specific output system that generates files in UIO format after a prescribed number of simulation timesteps or alternatively after a prescribed time interval see parameter dtime_out_hion Output after a fixed number of timesteps is mainly useful for debugging The files are named HION aaaa bb cccc out with aaaa either step or time indicating output after a fixed number of timesteps or a fixed amount of solar time bb the atom identifier and cccc the number of the output file e g HION step H 0001 out The HION files can be read with the IDL uio_dataset_rd filename function The resulting data structure contains mass density gas temperature electron density of the atmosphere as well as the axes in the atmos substructure The atom substructure contains the time dependent populations ntd the LTE populations nstar the total population ntot a number of atomic parameters and 1_ntr and c_ntr arrays of the z index per column where the radiation temperature in a transition starts to deviate from the gas temperature Refer to Leenaarts amp Wedemeyer Bohm 2005 for more details 8 6 Text output rhd out During execution expecially during the initialization phase CO5BOLD writes lots
182. he access to binary UIO files of one common format IEEE big_endian on all machines and compilers tested Compaq alpha Cray Hitachi HP V2500 HP Itanium2 IBM Intel AMD with Linux OS and PGI Intel or Pathscale compiler NEC SX 5 SGI and Sun Problems might arise with the transition to records larger than 2 GByte which require an extension of the current standard The GNU Fortran compilers particularly g95 might introduce a 64 bit system that does not allow to read older 32 bit files even small ones Each file entry is a header data unit The header contains information to identify the entry and to specify the format and size of the following data block This block usually consists of a scalar or an array In some cases it is empty e g for labels or it contains more complex information for tables The first version of UIO routines was written in FORTRAN77 It still exists However further development was done with the Fortran90 versions Therefore the use of the FORTRAN77 routines is not recommended anymore The current Fortran version of the UIO routines is a set of Fortran90 modules To allow a communication between Fortran and IDL programs an IDL version of the UIO routines has been written The correspondence between Fortran and IDL routines is rather close But in detail there are differences Currently IDL Version 6 0 is used Amazingly the UIO routines also used to work under PV WAVE Version 6 01 sun4 solaris sparc 83
183. he default value is 0 0 Example real c_resb f E15 8 b 4 amp n Parameter for numerical resistivity u 1 0 0 The artificial electric resistivity of Stone amp Pringle 2001 is used It is given by ng c_resB j Ax v p where ng is the magnetic diffusivity j the current density Ax a mean width of the grid cell and p is the density Values lt 0 disactivate this feature 7 1 10 7 real c_resbconst This parameter specifies a constant magnetic diffusivity Nm The default value is 0 0 Example real c_resbconstant f E15 8 b 4 amp n Parameter for constant magnetic diffusivity u cm 2 s 0 1 A reasonable value can be found by choosing a reasonable value for the magnetic Reynolds number Remag lovo Nm Values lt 0 disactivate this feature 132 CHAPTER 7 INPUT AND CONTROL FILES 7 1 10 8 real c_resepsilon This parameter controls an additional numerical energy diffusion Typical values are between 0 0 and 1 0 The default value is 0 0 Example real c_resepsilon f E15 8 b 4 amp n Parameter for additional energy diffusion u 1 0 5 The diffusion coefficient of the additional energy diffusion is given by ng c_resepsilon j Azx p analog to the magnetic diffusivity c_resB Values lt 0 disactivate this feature 7 1 10 9 real beta_inv This parameter is used for the dual energy method It determines which cells are updated with the thermal energy equation Example real beta_inv f E15
184. he same radial profile as CosSqr but apply the drag force to the merid ional velocity components only 7 1 5 Boundary conditions MHD only The following parameters are specific to MHD simulations For MHD calculations they must be set additional to the hydrodynamic boundary parameters 7 1 5 1 character side_bound_mag x1 and side_bound_mag_x2 The boundary condition at the sides perpendicular to the x1 direction and perpendicular to the x2 direction respectively They are given by e g character side_bound_mag xi f A80 b 80 n side boundary conditions magnetic x1 fixed character side_bound_mag x2 f A80 b 80 n side boundary conditions magnetic x2 periodic Possible values are e constant constant extrapolation of all magnetic field components into the ghost cells e periodic periodic continuation of all magnetic field components into the ghost cells e fixed the component normal to the boundary is kept fixed at its inital value Constant extrapo lation applies for the transversal components e vertical constant extrapolation for the vertical component The transversal cell centered field is mirrored with the opposite sign That should result in transversal components of the boundary centered field being zero at the boundary e vertical2 constant extrapolation for the vertical component The transversal cell centered field is set to zero 7 1 PARAMETER FILE RHD PAR 113 e reflective The magnetic field is mirro
185. he source code directories These subdirectories typically have the name of the machine architecture or operating system the executable is compiled for 29 30 CHAPTER 3 CO5BOLD FILE OVERVIEW 3 2 Fortran files Tables 3 2 and 3 3 show a list of all source files necessary to compile the complete version of CO5BOLD File and path Abb Description hd rhd rhd F90 RHD main program hd rhd rhd_hyd_module F90 RHD hydrodynamics routines hd rhd rhd_baserad_module f90 RHD basic radiative transfer hd rhd rhd_lhdrad_module F90 RHD radiative transfer routines long characteristics global models hd rhd rhd_shortrad_module F90 RHD radiative transfer short characteristics global models hd rhd rhd_shortrad_dtauop01 f90 RHD short characteristics tau coupling hd rhd rhd_shortrad_dtauop02 f90 RHD short characteristics tau coupling hd rhd rhd_shortrad_operator00 f90 RHD short characteristics operator hd rhd rhd_shortrad_operator05 f90 RHD short characteristics operator hd rhd rhd_shortrad_operator06 f90 RHD short characteristics operator hd rhd rhd_shortrad_bound01 f90 RHD short char boundary condition hd rhd rhd_vis_module F90 RHD tensor viscosity hd mhd rhd_mhd_module F90 MHD magnetic fields rad hdrad rhd_rad_module F90 RAD interface for rad hdrad MSrad3D F90 RAD Matthias radiation transport long characteristics local models eos f90 gasinter_routines F90 EOS equation of state opa opta cubit_module f OPTA cubic in
186. his ruins the conservativity of the code in these layers and should be applied only in very remote corners which are then considered only as sort of extended boundary region but not as part of the real model The parameter can be specified e g with real ri_rad f E15 8 b 4 n Outer radiation transport radius u cm amp c0 0 0 Not used 8 00000e 13 A value of 0 0 default or below deactivates this feature 7 1 4 21 real rho_min During long periods of matter infall the density at an open outer boundary can become very low To limit the decrease of the density a lower limit in the extrapolated ghost cells can be set e g with real rho_min f E15 8 b 4 n Minimum boundary density u g cm 3 1 0E 25 The density within the model will typically not fall much below this value A value of 0 0 default or below deactivates this feature 7 1 4 22 real c_coredrag To damp the flow in the core of models with central potential a drag force restricted to the inner part of the model r lt r0_grav can be applied It is controlled e g with real c_coredrag f E15 8 b 4 n Core drag force parameter u 1 1 0 A value of 0 0 default or below deactivates this feature 7 1 4 23 character hdcoredragprofile This parameter allows to choose between various radial profiles for the core drag force used to damp motions in the core of global models It may be called by character hdcoredragprofile f A80 b 80 n Core drag profile
187. ho_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Absorption Coefficient amp u 1 cm quc001_xmean d 1 1 1 1 1 120 f E13 6 p 4 b 4 amp n Number density of CO amp u 1 cm 3 rreal rhovb_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp real real real real n Mass flux amp u g cm amp ds 0 0 0 0 0 1 frhovi3b_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n Momentum x1 flux x3 direction amp u erg cm 3 ds 0 0 0 0 0 1 frhov23b_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n Momentum x2 flux x3 direction amp u erg cm 3 ds 0 0 0 0 0 1 frhov33b_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n Momentum x3 flux x3 direction amp u erg cm 3 amp ds 0 0 0 0 0 1 feipb_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n Enthalpy Flux amp u erg cm 2 s amp ds 0 0 0 0 0 1 172 CHAPTER 8 OUTPUT AND STATUS FILES real fekb_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 Y n Kinetic Energy Flux u erg cm 2 s amp ds 0 0 0 0 0 1 real fegb_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n Gravitational Energy Flux amp u erg cm 2 s amp ds 0 0 0 0 0 1 real fepb_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n Pressure Energy Flux u erg cm 2 s amp ds 0 0 0 0 0 1 real fevb_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n Viscous Energy Flux amp u erg cm 2 s amp ds 0 0 0 0 0 1 real ferb_xmean d 1 1 1 1 1 121 f E13 6 p 4 b 4 amp n
188. i3 alpha0_til_2 i1 i_up_pl i1 i2 i3 i1 j i2 i3 end do j end do il end do i2 end do i3 5 5 3 Compiler macros or switches Compiler switches are used to des activate modules or compile alternative branches to improve perfor mance The default values are set in the header section of each file as e g in lar Default values Tor some preprocessor mact s 2 1 Number of additional quantities ifndef rhd_box_quc01 define rhd_box_quc0i 0 endif 80 CHAPTER 5 PROGRAMMER S GUIDE 1H Gravity correction 0 off0 1 default0 2 3 4 5 6 11 defaultn ifndef rhd_hyd_gravcorr_p01 define rhd_hyd_gravcorr_p01 5 endif Ik Method of entropy fix calculation 0 1 2 ifndef rhd_hyd_entropyfix_p01 define rhd_hyd_entropyfix_p01 0 endif 14 Method of upwind calculation 0 or 1 ifndef rhd_hyd_upwind_p01 define rhd_hyd_upwind_p01 0 endif Loop type for alpha value amplitude calculation 0 default 1 2 3 ifndef rhd_roeid_flux_101 define rhd_roeid_flux_101 1 endif i MPI activation ifndef rhd_mpi_101 define rhd_mpi_101 0 endif To document which switches were used to compile the code each module that uses compiler switches should contain a _SwitchInfo routine that is called by the main program It can look lik
189. iB 7 1 5 3 character bottom_bound_mag The boundary condition at the bottom of the model is given by for instance character bottom_bound_mag f A80 b 80 n bottom boundary conditions magnetic inoutflow Possible values are e constant constant extrapolation of all magnetic field components into the ghost cells e periodic periodic continuation of all magnetic field components into the ghost cells e fixed the component normal to the boundary is kept fixed at its inital value Constant extrapo lation applies for the transversal components e vertical constant extrapolation for the vertical component The transversal cell centered field is mirrored with the opposite sign That should result in transversal components of the boundary centered field being zero at the boundary e vertical2 constant extrapolation for the vertical component The transversal cell centered field is set to zero e oblique magnetic fields with a given inclination at the boundary The inclination is specified through parameters C_magthetaB and C_magphiB e inoutflow magnetic field can be advected into the computational domain by ascending material flow Its strength can be specified with the parameter b1_inflow The boundary condition for the hydrodynamic variables must be set to inoutflow too otherwise this boundary condition is the same like constant 114 CHAPTER 7 INPUT AND CONTROL FILES In the case of inoutflow the magnetic field which is advec
190. iate as EOL character sequence The following data block is written as sequence of lines The number of items per line is specified by the p keyword in the header 6 2 3 3 Tables For a table the entry header is followed by a list of headers for the individual table columns a single table header line consisting of abbreviations of the table entry identifiers and the table itself see the example in section 6 2 2 The dimension keyword gives the number of columns and rows in the form d 1 columns l rows The Holweger M ller Atmosphere is chosen as the following real world example for a file with a 88 CHAPTER 6 DATA FILE TYPES table in UIO format fileform uio form formatted convert ieee_4 version 0 0 1996 10 29 amp date 20 Feb 1997 18 40 45 system Sun0S machine saturn osrelease 4 1 3 amp osversion 3 hardware sun4m language IDL 4 0 program by hand character description d 0 3 f A80 p 1 b 80 d 13 Nov 1996 18 29 48 Holweger Mueller Atmosphere Hartmut Holweger amp Edith Mueller 1974 Solar Physics 39 19 30 table II empirical solar temperature stratification to fit solar spectral lines and limb darkening character history d 0 3 f A80 p 1 b 80 d 13 Nov 1996 18 29 52 Holweger Mueller Atmosphere from 1974 uio form 13 Nov 1996 18 29 52 conversion type added 20 Feb 1997 18 21 01 xi gt vmicro 20 Feb 1997 18 23 43 real teff f F6 1 b 4 n effective temperature
191. iate for CO5BOLD e auto auto parallelization not implemented for all machines 4 3 1 6 F90 DEBUG Debugging level e 0 no extra debugging information produced full optimization is chosen default e 1 standard debugging mode typically switch g instead of fast e 2 other debugging or array checking modes possible if implemented for the requested machine 4 3 CONFIGURE SCRIPT 39 4 3 1 7 F90 OPTIMIZE Optimization e 0 no explicit optimization default if F90_DEBUG 1 e 1 try to find automatically sensible optimization flags That s the default if F9O_DEBUG 0 How ever often it is better to specify the optimization flags explicitly e ipo 03 xHost example set the optimization flags by hand This is a better way to specify the optimization than using F90_POSTFLAGS 4 3 1 8 F90 LHDRAD LHDrad radiation transport e 0 do not activate compile and link this module default e 1 activate this radiation transport module 4 3 1 9 F90 MSRAD MSrad radiation transport e 0 do not activate compile and link this module default e 1 activate this radiation transport module 4 3 1 10 F90 SHORTRAD SHOR Trad radiation transport e 0 do not activate compile and link this module default e 1 activate this radiation transport module 4 3 1 11 F90 CHEM CHEM module chemical reaction networks e 0 do not activate compile and link this module default e 1 activate this source step module Setti
192. ically Molecules consisting of more than one atom of the same chemical element e g Ha are also possible H2 A special case is the representative metal M which is a catalytic element only ie it must appear as reactant and product The special symbol PHOTON represents a photon as reaction product Currently no photon can be used as reactant ionising or exciting another species The reaction coefficients are needed to calculate the chemical rates at runtime The basic rate is then given by k a T300 ee 5 7 2 where 7300 T 300 K with T the gas temperature For catalytic reactions which involve a representative metal also the number density nm of the metal enters k NM Q Tooo e YT 5 7 3 An input file could look like this 5001 H H H2 H2 H2 9 00E 33 0 6 0 0 AK 5002 H H H H2 H 4 43e 28 4 0 0 0 DBDDG72 4069 H2 H2 H2 H H 1 00e 08 0 00 84100 0L 28034 4071 H2 OH 0 H2 H 6 00e 09 0 00 50900 0L 16964 66 C OH 0 CH 2 25e 11 0 50 14800 0L 4934 67 C OH co H 1 81e 11 0 50 0 0 W80 3707 C 0 co PHOTON 1 58e 17 0 34 1297 4C BDD90 7001 C 0 H co H 2 14e 29 3 08 2114 0D DBDDG76 4076 CO M D Cc M 2 79e 03 3 52 128700 0D CBDDG76 Refer to Wedemeyer Bohm et al 2005 for more details 7 6 HION input Several input files are required for the time dependent treatment of hydrogen ionization Currently they need to be stored in the same input directory as specified with the parameter hion_datapath There are four input files e model atom
193. igin dp iis pias a ee REE Br e a ha B e A ek ES 66 4 6 14 SGI Origin 2000 3800 at UKAFF o 66 4 6 15 Sun SunFirel eee 69 71 A E 71 E ed en en ed E 71 5 2 1 General layout and indentation recommendations a e a 71 5 2 2 Alignment of assignments and equations ooo e a a 71 5 2 3 Normal code indentation o 0 eeen 73 5 2 4 Further recommendations en 73 5 3 Naming Conventos 74 5 3 1 File names aon start aaa a ent ant Bt BOR OR aT ea E GH a 74 9 3 2 Program namesl o 74 5 3 3 Names of modules subroutines and functions eee 74 5 3 4 Variable names 74 5 4 OTT ci te Fede SS wa ee ho ee Po ee ek Ye 2 Re ek Bee ee 75 5 4 1 Header of files ee 75 5 4 2 Header of modules a a 75 5 4 3 Header of subroutines and functions eee TT 5 4 4 Comment lines 1 78 5 4 5 Short comments after Fortran statements 78 5 5 Compiler switches and directives a a 79 9 9 1 OpenMP sitos re 2 a A e ee A AT dS 79 5 5 2 Compiler directives eeen 79 5 5 3 Compiler macros or switches ooo ee 79 o6 Umit test sa e A ende A ee e a we ee eh en O 82 5 6 1 BOO UNEL ty zen oe zeen ot ae oan em GB BRE a we Gee A 82 6 CONTENTS 83 do sa de Sc E A ee eee en Se 83 EE 83 sod eae a A A xe 83 A A EE ER Ee ee ede 84 6 2 3 Structure of UIQ files 2 o e 85 6 2 3 1 Data representation ASCII or bin
194. ile name rhd mcyl Leaving it empty means that no file of this type is written Only in the case of global models such data is computed It is particularly useful for rotating models 7 1 PARAMETER FILE RHD PAR 159 7 1 21 14 character outfile_chul The name of the file for the output of an additional data chunk at regular intervals the same as for mean file can be specified with e g character outfile_chui f A80 b 80 n Output file name for chunks rhd chui The UIO format is the same as specified for mean files Leaving the name empty means that no file of this type is written 7 1 21 15 character outfile chu2 The name of the file for the output of an additional data chunk 2 can be specified with this parameter analogously to character outfile_chul 7 1 21 16 character outfile_chu3 The name of the file for the output of an additional data chunk 3 can be specified with this parameter analogously to character outfile_chul 7 1 21 17 character outform_end The format see Sect 6 2 3 1 of the final model files can be chosen e g with character outform_end f A80 b 80 n Output file format amp cO formatted unformatted unformatted Allowed values are e unformatted default fast compact possibly machine dependent output strongly recommended e formatted slow machine independent output big files 7 1 21 18 character outconv_end The conversion type see Sect 6 2 3 1 of the final model files can
195. int mass flux divergence viscosity coefficient u 1 0 0 A value of 0 0 switches it off Values of 0 5 or even 2 0 are reasonable The viscosity controlled with this parameter acts only on compressible flow configurations i e in near incompressible low Mach number flows it should have hardly any effect Still it can be used in exacly such a case to dampen spurious sound waves for example at the very top of the computational box 7 1 11 15 real c_visp2pincl1 The interaction with the edge neighbor cells with indices 1 1 0 can be specified with e g real c_visp2pincli f E15 8 b 4 amp n Point to point viscosity inclined cell factor 1 u 1 10 Common values are 1 0 interaction is considered and 0 0 no interaction with these cells The usual value is 1 0 7 1 11 16 real c_visp2pincl2 The interaction with the corner neighbor cells with indices 1 1 1 can be specified with e g real c_visp2pincl2 f E15 8 b 4 amp n Point to point viscosity inclined cell factor 2 u 1 0 0 Common values are 1 0 interaction is considered and 0 0 no interaction with these cells The usual value is 0 0 to save some computation time 7 1 PARAMETER FILE RHD PAR 137 7 1 11 17 integer n_viscellsperchunk The number of cells per box or chunk treated by the tensor viscosity scheme at one call and by one thread can be set e g for an Intel Macintosh with integer n_viscellsperchunk f I9 b
196. into a pathological state where the time step decreases rapidly without recovering To prevent a simulation in such a case from running forever or until some other process time restriction applies without actually advancing significantly in time it is possible to specify an absolute minimum time step e g with real dtime_min_stop f E15 8 b 4 n Minimum time step u s amp c0O dtime_min_stop 0 0 gt no restriction amp c1 dtime lt dtime_min_stop gt program stop 1 0 If the actual time step falls below this value the simulation finishes gracefully This values has to specified as absolute time and has to be chosen carefully for each individual model or each group of models This time step restriction can be switched off by setting real dtime_min_stop 0 0 But in general one should keep it activated and try to find a proper positive value 7 1 20 5 real dtime incmax Sometimes a time step restriction can lead to a sudden drastic drop in the time step To prevent unwanted oscillations in the size of the time step its increase can be restricted e g with real dtime_incmax f E15 8 b 4 n Maximum time step increment factor u 1 amp c0 dtime max lt 1 0 gt no restriction cl typically 1 1 12 This value specifies the maximum factor by which the time step can be increased from step to step even if the new Courant condition etc would allow more A value value lt 0 0 deactivates this restriction 7 1 20
197. ipation by construction 7 1 9 19 real c_hydtdifflin The Roe solver correction does not have any dissipation for standing waves and very little for slowly moving ones unlike the MHD HLLE solver that always has quite some minimum dissipation depending on the reconstruction though The small amount of dissipation is a positive feature when it comes e g to convection with smaller Mach numbers in the deeper layers of a solar model or the absence of vertical net mass fluxes in a hydrostatic atmosphere However it can be a drawback e g in the case of a transsonic rarefaction wave where an entropy fix is applied since the beginning see Leveque Numerical Methods for Conservation Laws or in the rather quiet center of a Sedov blast wave where a cross like structure with comparably low temperature is visible This artefact can be removed by applying the standard tensor viscosity including the energy dissipation down an entropy gradient controlled with C_visPrturb of by the new rather simple option to the Roe solver to apply additional energy dissipation down a temperature gradient but only in cells adjacent to a local temperature minimum in 1D It works nicely for the Sedov blast wave and does not have any visible adverse impact in any other cases so far 130 CHAPTER 7 INPUT AND CONTROL FILES I don t expect it to do any harm for convection simulations and recommend to activate it per default Cautious people might not like
198. is shown in Sect 8 1 6 2 4 Files amp directories amp paths All UIO routines are located in sub directories of a common directory uio The subdirectories and their contents are uio bin shell scripts uiolook Sect 6 2 6 2 uiocat Sect 6 2 6 3 uioinfo Sect 6 2 6 4 uio f90 Fortran90 source code see Tab 6 5 uio man mani manual pages for shell scripts uiolook uiocat uioinfo idl bflib uio IDL routines Sect 6 2 7 To use the UNIX scripts and the Makefile you could set a global system variable UIOPATH pointing to this directory The path to the shell scripts and to the man pages could be added to your shell path variables e g in one of the login scripts C shell cshrc g LO setenv UIOPATH HOME uio setenv PATH PATH UIOPATH bin setenv MANPATH MANPATH UIOPATH man Ho xxx Korn shell kshrc or bash bashrc uio UIOPATH HOME uio export UIOPATH PATH PATH SUIOPATH bin export PATH MANPATH MANPATH UIOPATH man export MANPATH However with the UIO configure script and make make install there is a different method available that adds the path declarations automatically see Sect 6 2 6 1 90 CHAPTER 6 DATA FILE TYPES File Contents uio_base_module f90 Collection of basic modules uio_mac_module F90 Machine dependent routines for all machines uio_bulk_module f90 Main part of UIO routines uio_filedef_module f90 S
199. istic timescales and depend particularly on gravity 7 1 20 1 real dtime start The initial time step recommendation of a simulation is usually taken from the start model file It can be overwritten e g with real dtime_start f E15 8 b 4 n Start time step u s 1 0E 03 A value lt 0 0 means that the original value from the start model is used 7 1 20 2 real dtime_min In some rare cases it might be useful to specify explicitly the minimum time step with e g real dtime_min f E15 8 b 4 n Minimum time step u s amp c0 dtime_min 0 0 gt no restriction 1 0 This value is used even if restrictions from the Courant condition try to enforce a smaller value A fixed time step can be prescribed by setting dtime_min dtime_max to some positive value A value dtime_min lt 0 0 means that this time step restriction is completely ignored which is the case that should usually be chosen 7 1 PARAMETER FILE RHD PAR 153 7 1 20 3 real dtime_max It is possible to explicitly specify the maximum time step too e g with real dtime_max f E15 8 b 4 n Maximum time step u s amp cO dtime_max 0 0 gt no restriction 1 0E 05 A fixed time step can be prescribed by setting dtime_min dtime_max to some positive value A value dtime_max lt 0 0 means that this time step restriction is completely ignored which is the case that should usually be chosen 7 1 20 4 real dtime_min stop Sometimes a simulation can run
200. it and see how well it works without though Still unlike the tensor viscosity with turbulent Prandtl number there is no viscous flux down the subphotospheric temperature or entropy gradient unless there is a local minimum at the bottom The linear diffusion can be set e g with real c_hydtdifflin f E15 8 b 4 amp n Parameter 1 for energy diffusion near local temperature minimum u 1 amp cO typically 0 2 if activated usually 0 0 0 0 It just acts on the temperature gradient in the neighborhood of a local minimum whereas C_hydTdiffMach see below has an additional factor that takes velocity gradients into account which prevent this type of diffusion from acting in deeper convective layers I recommend as a default C_hydTdiffLin 0 0 and non zero values only in case of an emergency and C_hydTdiffMach 1 0 or 2 0 as a default These parameters are not recognized by the MHD module 7 1 9 20 real c_hydtdiffmach Analogously to c_hydtdifflin an additional energy dissipation down a temperature gradient but only in cells adjacent to a local temperature minimum in 1D can be applied that has a scaling factor derived from the Mach number This Mach number dependent diffusion can be set e g with real c_hydtdiffmach f E15 8 b 4 amp n Parameter 1 for energy diffusion near local temperature minimum u 1 amp cO typically 0 2 if activated usually 0 0 1 0 I recommend as a default C_hydTdiffLin 0 0 and non zero values
201. itches of different compilers can be found in the Compiler and tools tricks by Arnaud Desitter 2008 56 CHAPTER 4 COMPILATION amp INSTALLATION 4 6 1 Cray SV1 On craSHi in Kiel a CRAY SV1 20 32768 SN9542 now out of service CO5BOLD could use all 4 processors per board The new configure script still includes a branch for this system even if has never been tested on that machine In some cases the non default versions of loops in the CO5BOLD code vectorize better and are preferred over the standard ones e F Enable macro expansion e Otask1 Parallelization Enable tasking in this case OpenMP e Oinline3 Optimization enable high level of inlining e Ovector3 Oscalar3 General optimization e Drhd_hyd_roe1d_101 1 Optimization Choose non standard set of routines for Roe solver See Sect 4 4 8 2 e Drhd_hyd_entropyfix_p01 1 Optimization version with masks weights See Sect 4 4 5 2 e Drhd_hyd_upwind_p01 1 Optimization version with masks weights e Drhd_shortrad_operator_101 2 Optimization short characteristics operator with masks weights e Drhd_shortrad_dir_102 1 Optimization OMP PARALLEL statement outside of outer loop in rhd_shortrad_dirX 4 6 2 Compaq alpha The UIO module allows the reading and writing of files in little _endian and big_endian format In the preprocessor switches are listed that control the modern single version uio_mac_module F90 of this file e a
202. ith standard Roe treatment from pressure and density old default e Entropy1 Compute entropy wave flux from entropy This only works well for small Mach numbers 7 1 PARAMETER FILE RHD PAR 127 e Entropy2 Compute entropy wave flux from entropy and pressure e Entropy3M Compute entropy wave flux from entropy pressure and density In fact an cases Normal and Entropy1 are interpolated according to the Mach number e Entropy3Ms Compute entropy wave flux from entropy pressure and density In fact an cases Normal and Entropy1 are interpolated according to the Mach number and entropy fluctuations e Entropy3gMps Compute entropy wave flux from entropy pressure and density In fact an cases Normal and Entropy1 are interpolated according to the Mach number and fluctuations in pres sure directly and after subtracting the hydrostatic pressure correction and entropy This case is recommended The Normal computation with the standard Roe procedure is optimized for shocks and works also for small fluctuations in density and pressure However in the case of a nearly adiabatic stratification the density and pressure fluctuations between adjacent depth points induce some spurious fluxes These are avoided by reconstructing the entropy directly Entropy1 However that does not work well for shocks Therefore an interpolation between the standard reconstruction based on pressure and density and another one based on entropy is recommen
203. itional output Produce timing information for inner boundary routine central potential or lower and upper boundary routines constant gravitation It can be used together with OpenMP Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 COMPILER MACROS 47 4 4 5 6 rhd roeld flux t01 rhd roe 1 dimension flux timing 01 in rhd_hyd_module F90 Category additional output Produce timing information for the routine which computes the Roe fluxes It should not be used in conjunction with OpenMP Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 5 7 rhd roeld step t01 rhd roe 1 dimension step timing 01 in rhd_hyd_module F90 Category additional output Produce timing information for the routine which performs the Roe step It should not be used in conjunction with OpenMP Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 6 Hydrodynamics tensor viscosity 4 4 6 1 rhd vis density p0l rhd viscosity density parameter 01 in rhd_vis_module F90 Category selection of approximation Choose formula for density average at cell boundary in tensor viscosity routines Values e 0 rhomean min rholeft rhoright e 1 default rhomean 0 5 rholeft rhoright 4 4 6 2 rhd vis t01 rhd viscosity timing 01 in rhd_vis
204. ization choose standard set of routines for Roe solver See Sect 4 4 8 2 e Drhd_shortrad_operator_102 1 Optimization use the manually inlined version of the short characteristics operator e Drhd_shortrad_dtauop_102 1 Optimization use the manually inlined version of the optical coupling operator 4 6 8 Linux Intel compiler The compiler is called with ifort ifc on older compiler versions With Version 7 0 and 7 1 of the Intel compiler version 15 0 here CO5BOLD compiled with tricks see below Version 8 0 still caused trouble With version 9 1 and up everything compiles with some glitches for certain version every now and then The native binary format on Intel machines is little _endian With export F_UFMTENDIAN big to be set at runtime after compilation before running CO5BOLD the default can be changed to big_endian In the preprocessor switches are listed that control the modern single version uio_mac_module F90 Important switches are e fast Optimization choose a general optimization close to optimual for the local machine It actually activates a number of other optimization flags that might change with compiler version This option currently is not recommended for CO5BOLD because the too aggressive optimization causes runtime errors the offending sub flag appears to be no prec div Instead the working sub flags are specified individually 62 CHAPTER 4 COMPILATION amp
205. justment e lt 0 0 not allowed 7 1 4 11 real c_pchange The inoutflow boundary condition not only controls entropy and velocity but also the pressure in the bottom layers It is locally adjusted towards the global average to damp out possible instabilities The adjustment rate can be specified e g with real c_pchange f E15 8 b 4 n Rate of pressure change for open lower boundary u 1 1 0 7 1 4 12 real c_v3changelinbottom For the open lower boundary condition inoutflow and inoutflow2 a damping of the vertical velocity at the open boundary can be specified e g with real c_v3changelinbottom f E15 8 b 4 amp n Linear velocity reduction rate at bottom u 1 0 0025 The open lower boundary condition tends to produce a slight reduction of the horizontal velocities at the very bottom As the HD solver does not apply any extra viscosity at the bottom layers the MHD solver has this option there is a tendency to produce a slight predominance of vertical velocities in the regions where matter enters the computational box through the lower boundary By introducing a little bit of damping of the vertical velocity component this tendency can be significantly reduced Guide values are e 0 0 off no linear damping e 0 002 small reasonable value e 0 005 large possible useful value 7 1 4 13 real c_v3changesqrbottom For the open lower boundary condition inoutflow and inoutflow2 an additional damping of the vertical veloci
206. k_up_mi v1 i1 1 i2 i13 cs i1 1 i2 i13 amp or Delete all global mask_up_mi v1 i1 boxes if rhd_box_Exist modelVis call rhd_box_Delete modelVis if rhd_box_Exist modelB if rhd_box_Exist modelA call rhd_box_Delete modelB call rhd_box_Delete modelA 12 13 cs i1 12 13 Properly aligned assignments facilitate the understanding and debugging enormously In more complex assignments corresponding brackets should be carefully positioned However dif ferent styles and conventions can be used as e g model vi i1 i2 i3 model vi ii i2 i3 amp or model vi i1 i2 i3 model vi ii i2 i3 or model vi i1 i2 i3 model vi ii i2 i3 amp dtimeoverrhodx1 flux_rhovii iiti i2 flux_rhov11 i1 i2 dtimeoverrhodx3 flux_rhov13 i1 i2 flux_rhovi3 i1 i2 dtimeoverrhodx1 flux_rhov11 i1 1 i2 flux_rhov11 i1 i2 dtimeoverrhodx3 flux_rhov13 i1 i2 flux_rhov13 i1 i2 dtimeoverrhodx1 flux_rhov11 i1 1 i2 flux_rhovii i1t i2 dtimeoverrhodx3 flux_rhov13 i1 i2 flux_rhov13 i1 i2 amp i3 amp i3 8 i3 1 i3 i3 amp i3 8 i3 1 i3 amp i3 amp i3 amp amp i3 1 i3 amp Sometimes the fluffy third form can greatly increase the readability Sometimes probably in the example above it might just be overdoing it 5 2 INDENTATION AND SPACES 73 5 2 3 Normal code indentati
207. l for debugging purposes If a run was successful i e it was completed because one of the regular termination conditions was fulfilled e g the requested number of time steps was performed the exit status file rhd done is produced Currently it contains the date and time of its generation The existence of this file can be checked within a script to determine if the simulation was successful and should be continued Note the existence of an rhd end file only indicates that COSBOLD managed to exit gracefully due to an error or in a regular way Chapter 9 Running a simulation 9 1 Quickstart How to run CO5BOLD The generation of a start file and the modification of the parameter file is a somewhat complex process In short the following steps have to be performed 1 2 Produce an executable rhd exe see Sect 4 1 and put it into your working directory Make sure the environment variable LD_LIBRARY_PATH is still set correctly so that all necessary libraries are included which usually just means don t change it after a successful compilation Choose a start model e g the final model of an earlier simulation or a model produced with an IDL routine Create the parameter file rhd par typically you will start with an existing file and edit it just a bit You should check that the paths names of EOS and opacity files are set correctly watch the username For details about the parameter file see Sect
208. l model parameters 2 eeen 103 7 1 3 1 eal teiue cs Pa eedt ee Ma a dd 103 7 1 3 2 character grav_mode o e e 103 7 1 3 3 A A A eenn Me eh ete a oe rd 103 7 1 3 4 real mass star l eeen 104 7 1 3 5 A EA 104 7 1 3 6 A taat eo SR ee meute ir ed e B ea AR GO 104 7 1 3 7 AA e enie e a ay ee we Se ok fe eee es Yo we a c 104 7 1 3 8 real TO cOre sui es boe a Oe ee er He ae a ee E 104 7 1 3 9 character centrifugal_force o o e e 105 7 1 3 10 real nu rotation se s s seosta k i ep aa a ah p e A a a 105 7 1 3 11 real ar_rotation naxis 2 a 105 7 1 4 Boundary conditions general e 105 7 1 4 1 character side bound gt gt s soste ae mis da eee 105 7 1 4 2 character top bound e 106 7 1 4 3 character bottom bound aaa e 106 7 1 4 4 character heat mode 107 7 1 4 5 character hdcoreheatprofile o 0 o 107 7 1 4 6 real luminositypervolume o o e 108 7 1 4 7 real s_inflow Ll 108 CONTENTS 7 7 1 4 8 real s inflradgrad eee 108 7 1 4 9 real s infllatgrad 108 7 1 4 10 teal c SChangel awe ox a ad YG ee a ee e 108 7 1 4 11 real cpchangel a 109 7 1 4 12 real c_v3changelinbottom o 000004052 eee 109 7 1 4 13 real c v3changesqrbottom o e o 109 11414 realc_visbound 0 0 0002 eee ee ee 109 7 1 4 15 real crhochangetop eeen 110 7 1 4 16 real c t
209. ld deem beneficial This parameter is not recognized by the MHD module 7 1 9 8 real c_reccontshift The second order reconstruction schemes except FRcont have the option to make the reconstruction even more continuous in the case of very low Mach numbers controlled with C_RecContShift and C_RecContSteep The value can be set e g with real c_reccontshift f E15 8 b 4 n Enhanced reconstruction continuation parameter 1 for shifting amp c0 0 0 off 1 0 reasonable value 0 2 Typical choices are e 0 0 No attempt is made to make the reconstruction more continuous The original reconstruction is used e 0 1 Make the transition to a smoother reconstruction at lower Mach numbers e 1 0 Reasonable value e 10 0 Make the transition to a smoother reconstruction at higher Mach numbers While the resulting scheme works for solar simulations the parameters are really of benefit only in the case of brown dwarfs or exoplanets or the deep layers of M dwarfs This parameter is not recognized by the MHD module 7 1 9 9 real c_reccontsteep The second order reconstruction schemes except FRcont have the option to make the reconstruction even more continuous in the case of very low Mach numbers controlled with C_RecContShift and C_RecContSteep The value can be set e g with real c_reccontsteep f E15 8 b 4 amp n Enhanced reconstruction continuation parameter 2 for steepening amp cO0 0 0 off 0 1 reasonable value
210. le F90 Category feature activation Switch to activate the array for the gravitational potential in the box structure If the switch is set to 1 a 3D array for the potential is created copied removed There is no module to compute the gravitational potential yet Therefore the entire thing has no practical value yet Values e 0 default no handling of array e 1 array handling activated 4 4 1 6 rhd box qucOl rhd box quantity centered 01 in rhd_box_module F90 and rhd F90 Category feature activation CO5BOLD is able to handle a number of further quantities que quantity centered in addition to the basic hydrodynamics quantities p ei if this compiler switch is activated These additional quantities can be e g densities of dust distribution moments or densities of molecules They are required for the treatment of chemical reaction networks and time dependent hydrogen ionization For the latter the que arrays contain the number densities of the atomic level populations For the chemical reaction network the arrays contain the species number densities in cm and with headers following this example Number density of H2 Values e 0 default no handling of additional quantities density arrays e 1 handling of additional density arrays is activated To actually include dust formation in a simulation it is necessary to 4 4 COMPILER MACROS 43 1 set the switch Drhd_box_quc01 1 during
211. le RungeXutta2 RungeKutta3 New parameters C_hydTdiffLin C_hydTdiffMach 7 T 9 19 C_RecContShift C_RecContSteep dustReconstruction 2012 01 12 New parameters C_hydSoundCourant C_hydSoundCourantmax 1 20 9 C_v3ChangeLinBottom C_v3ChangeSqrBottom 2012 02 16 New parameter C_TminLimit 7 1 16 8 2012 04 06 Added some lines in the Intel compiler section 4 6 8 2012 09 04 New options for hdTransVeloMode New parameters C_hydLowMachcsFactor hdEntropyWaveMode hdEnthalpyAvgMode C_hydsDiffVelo C_hydvDiffVelo C_visP2PhypSmagorinsky C_visP2PhypArtificial C_visP2PhypExpansion C_visP2Pdivrhov CLT 2012 11 07 New options for hdEntropyWaveMode 7 1 9 14 hdEnthalpyAvgMode character reconstruction 192 CHAPTER 11 DOCUMENT HISTORY 2013 09 11 New parameters outdim_chu2 outdim_chu3 outfile_chu2 outfile_chu3 character outfile_mcyl character hdcoredragprofile New compiler options better vectorization of EOS routines gasinter_101 better vectorization of opacity routines opta_switch_101 better vectorization of Roe upwind state computations rhd_roe1d_flux_101 Old compiler option removed rhd_roe1d_slope_101 pal oF 2013 09 18 Optionally parts of the source code included in the manual Revised script to produce the manual 2013 09 21 Some long itemize lists transformed into sequences of paragraphs Cleanup of reference list 2013 09 22 Changed documentclass article
212. les CHEM 7 5 4 3 and HION 7 6 including new parameters 7 1 12 1 and switches for the configure script 2006 08 14 MHD section MHD parameters 7 1 10 2007 02 12 Hydro section with new modii and parameters heat mode 7 1 4 4 rotating coordinate system 7 1 3 10 possible hydrodynamics iteration 7 1 8 6 new pressure correction scheme 4 4 5 1 unsplit hydrodynamics operator possible 7 1 8 3 189 190 CHAPTER 11 DOCUMENT HISTORY 2007 10 22 Double precision time as additional scalar in model file 2007 12 18 Rather stable version and parameter rearrangements for dust model dustscheme dust_k3mon_03 and dustscheme dust_bins_01 7 1 15 2008 03 13 Expansion Courant number C_hydExpCourant C_hydExpCourantmax 7 1 20 11 2008 03 17 Hydrostatic pressure correction in waves 3 and 6 switch on and offable with C_hydPredfactor 7 1 9 16 2008 04 27 Expansion viscosity C_visExpansion 7 1 11 4 2008 07 03 Linear viscosity C_visLinear 7 1 11 5 2008 08 13 Parameters N_radrsyslevel N_radoutput C_radTcool C_radDcool C_radscool in MSrad 7 1 17 6 parameters C_radTinci and C_radDinci to control incident radiation in MSrad 1 17 11 2008 08 14 Compiling double precision code 2008 08 19 Some parameters possibly valid for MHD module 7 1 10 6 2008 08 28 Rather old parameters for additional I O control integer n_outslicedim_mean 71 214 integer istep_in_start 1 21 9 2009 01 12 R
213. limits on the execution time per run On a CRAY the CPU time that is left can be accessed with a special subroutine in call tremain in timing_module F90 On other machines it is possible to specify the allowed total time for the job e g with real cputime f E15 8 b 4 n CPU time u s 1000000 0 During the run of CO5BOLD the leftover CPU time is computed by subtracting the used CPU time which is given by e_time etime tarray in timing_module F90 from the specified total CPU time for the job 7 1 19 4 real cputime_remainlimit Because CO5BOLD needs some time to finish the last time step it should start exiting well before all CPU time is used up This amount of buffer CPU time can be specified e g with real cputime_remainlimit f E15 8 b 4 n maximum remaining CPU time u s 2000 0 Its value depends on the size of the model and the speed of the machine more precisely the maximum CPU time per time step 7 1 19 5 real endtime If the simulation should run up to a certain stellar time its values can be specified e g with real endtime f E15 8 b 4 n total simulation time limit u s 10000 0 A value lt 0 0 deactivates this halt condition it is not checked at all If this parameter is set to a non negative value a follow up simulation should not use the same parameter file it would stop immediately 152 CHAPTER 7 INPUT AND CONTROL FILES 7 1 19 6 real plustime If the initial model should be advanced by a certain st
214. ll probably needed The parameter can be set e g with integer n_raditer f 14 b 4 amp n Number of radiation transport iterations c0 10 8 For a simulation of a solar type star with comparatively long radiative time scales it will typically be set to 1 For stars with shorter radiative time scales values around 10 may be considered All three radiation transport modules understand this parameter 7 1 16 5 integer n radmaxiter The absolute maximum number of iterations can be specified e g with integer n_radmaxiter f 14 b 4 amp n Maximum number of rad transport iterations c0 30 0 If more iterations are needed the computation for the current time step is stopped and resumed with a smaller one which means that the hydrodynamics and the tensor viscosity step have to be done again Usually n_radmaxiter will either be set to a value somewhat larger than the recommended number of iterations n_raditer or to 0 which disables the check for too many iterations completely This can be safely allowed in many cases and has the advantage that there is no need to save the initial model before calling the radiation transport module which saves some memory To disable the iteration of the radiation transport sub step set n_radminiter n_raditer n_radmaxiter 1 All three radiation transport modules understand this parameter 146 CHAPTER 7 INPUT AND CONTROL FILES 7 1 16 6 character radraybase Using the modules LHDrad or SHORTrad the
215. luxes Due to the lack of a sufficient number of letters in the alphabet loop indices don t all get their individual letters either Instead they look like i1 i2 5 4 COMMENTS 75 i3 iquc inu idir itime The lower grid index is m the upper is n So cell centered quantities in the absence of ghost cells go from m to n whereas boundary centered quantities go from m to n 1 5 4 Comments 5 4 1 Header of files The header of a file should contain a short summary of its contents as for example Nok ok ok ok ok ak ok ok of of ok ak ak ok ok ok ok ak ok ak ak ok ok ok ok ak ak ak ok ok of ok ok ak ak ak ak ak ok ok ok ak ak ok ok ok ok ok ak ak ok ak ak ok ok ok ak ak ak ok ok ok ok ak ak ak ok a ok ok ok ak ak ak ok of of ok ak ak ak ok ak ok ak ak ak ak ak ak ok ok ok ok ak ak ok ok ak oke HEHE HHHH HH HHHHH de HHH HHHHH H HHH HHHHHH H HH _module Radiation Hydrodynamics Code hydrodynamics module SOOO CGR aR ICI IOI Ka a A ACI I OK Kak ak A A kk 1 21 21 3 A 1 IKK a a ACI IK KK kkk kkk kkk kkk Fortran90 2015 04 04 BARRERA ORICA IO I I GK ICI IK I A IK 2K 21 21 1 21 1 24 21 1 4 21 okk k kkk kk kkk kkk kkk With contributions from Bernd Freytag Kiel Copenhagen Uppsala Montpellier Lyon Naples Werner Schaffenberger Exeter Sven Wedemeyer Boehm Freiburg aooo oaoa o ooo ok kkk kkk kk kkk kkk
216. m hydrodynamics in xl x2 and x3 direction Then half of the contributions from the steps in xl and x2 direction are used as sort of a predictor step for the full corrector step in x3 direction and accordingly for the two other directions At the end the three corrector step contributions are added That means that two hydrodynamics steps have to be performed in each direction with some overhead for copying and adding the contributions Still together with e g reconstruction FRweno there is a significant improvement for convection at small Mach numbers compared to 123 vanLeer This parameter is recognized by hdscheme Roe and hdscheme HLLMHD although hdscheme HLLMHD does not know hdsplit CTU 7 1 8 4 character reconstruction This parameter determines the order and aggressiveness of the reconstruction scheme with e g character reconstruction f A80 b 80 n Reconstruction method amp cO Constant c1 Minmod VanLeer Superbee c2 PP PPmimo c3 FRmimo FRmono 2 FRweno 2 FRcont FRweno2 Possible values are e Constant The run of the partial waves inside the cells is assumed to be constant A highly dissipative first order scheme results This values will usually only be used for test or comparison purposes e Minmod Chooses the smallest slope which still results in a second order scheme It is the most diffusive and most stable one in this class e VanLeer default The first order reconstruction metho
217. machines e g an older Intel Xeon with Linux and PGI compiler a dynamic scheduling activated with export OMP_SCHEDULE DYNAMIC 1 is advantageous The size of the individual chunks might be set to larger values than 1 in the examples above The optimal value has to be found empirically A good starting point is number_of_grid_points_in_1D Number_of_treads which gives for a model with 171 grid points on a 4 processor machine export OMP_NUM_THREADS 4 export OMP_SCHEDULE STATIC 43 However usually the general default export OMP_SCHEDULE STATIC is a good choice The number of threads should equal the number of available processors and has to be set at run time with the environment variable OMP_NUM_THREADS e g with 54 CHAPTER 4 COMPILATION amp INSTALLATION export OMP_NUM_THREADS 16 The size of the stack per thread can be set with OMP_STACKSIZE as e g in export OMP_STACKSIZE 300M Usually the default value is too small On machines with many cores experiments with KMP_AFFINITY might be beneficial for the performance as e g in export KMP_AFFINITY verbose granularity core compact 4 5 2 Vectorization To ensure a good performance on modern CPUs vectorization has to be enabled usually by enabling a sufficiently high optimization level with for instance 03 Ofast fast etc see Sect 4 6 The performance can be improved by choosing optimal branches in CO5BOLD i e by determining the optimal values for e rhd_box_
218. mation about the model or control parameters for further processing 7 1 1 Quickstart How to make a proper parameter file You will never write a new parameter file from scratch Typically you take an old file e g the one controlling the simulation which produced the model which is used to start the new run and edit it 1 Take the parameter file corresponding to the model you want the new simulation to start with Most of the parameters should be already OK 2 Write a brief description of the purpose of the planned simulation into the character description array Sect 7 1 2 3 You might add a remark about the parent file of the parameter file under construction and the current date into the character history Sect 7 1 2 4 array in the header see Sect 7 1 2 3 Check modify the name of start model and output files infile start Sect outfile_end Sect 7 1 21 10 outfile_full Sect 7 1 21 11 outfile_mean Sect 7 1 21 12 etc On a system with batch queue this has not to be done in the parameter file itself but in the external command file see Sect 7 1 21 4 Check modify the fundamental parameters including boundary condition specifiers see Sec tions and respectively e effective temperature heat_mode Sect 7 1 4 4 s_InFlow Sect 7 1 4 7 Teff Sect 7 1 3 1 LuminosityPerVolume Sect 7 1 4 6 e gravity grav_mode Sect 7 1 3 2 grav Sect 7 1 3 3 mass_star Sect 7 1 3 4 e abundanc
219. mber of cells per chunk in resistivity routine amp c0 0 gt one 2D slice at a time amp ci 1 gt minimum chunk size inefficient c2 10000 typical value 20000 The exact number is determined at run time to get approximately equal sizes of the individual chunks The choice of this parameter does not affect the result of the computation but the memory usage and performance Smaller and more chunks may result in an optimum cache usage and need the smallest amount of memory but result in additional overhead due to frequent subroutine calls Bigger and less chunks are to be preferred for vector machines and processors with large caches 7 1 10 4 real c_rescourant The tensor resistivity routines have their own time step restriction The recommended typical time step can be set e g with real c_rescourant f E15 8 b 4 n resistivity Courant factor u 1 amp cO range 0 0 lt C_resCourant typically 0 5 0 5 7 1 10 5 real c_rescourantmax The absolute upper limit for the resistivity time scale can be set with real c_rescourantmax f E15 8 b 4 n maximum resistivity Courant factor u 1 amp c0O range C_resCourant lt C_resCourantmax typically 1 0 0 95 Its value should be slightly above c_rescourant 7 1 10 6 real c_resb This parameter specifies the electric resistivity Values between 0 0 and 1 0 may be reasonable Higher values are possible but drastically reduce the time step T
220. metry of the external gravity field has to be specified e g with character grav_mode f A80 b 80 n Type of gravity field amp cO constant central central Three values are possible so far e central For the global star in a box case a central potential is assumed with origin at x 0 The stellar mass mass_star Sect 7 1 3 4 as well as some characteristic radii r0_grav r1_grav r2_grav r1_grav r0_core have to be specified e constant In the standard local box in a star case the constant gravity specified with grav Sect 7 1 3 3 is directed downward in x3 direction e localboxtide This activates a simple model for the action of a tidal wave on convection in a local box model It adds to the case of constant gravity a potential Pex which is harmonic in space and time according to Dex ox cos ky x1 wt 7 1 It is intended to mimic a travelling tidal wave Since the setup is considered experimental the parameters are set by the C_test parameters according ex C_test1 amplitude of potential variations kn C_test2 horizontal wavenumber w C_test3 frequency Boundary conditions in order to be compatible with periodic lateral boundaries kp should be an integer multiple of 27 times the inverse lateral box size 7 1 3 3 real grav In the case of a constant gravity the amount of the acceleration has to specified with real grav f E15 8 b 4 n Gravity u cm s 2 27500 0 Setting this
221. n mean molecular weight u u amp cO standard solar mixture 0 13018000E 01 It has no practical consequences because the actually used chemical composition is determined by the files for equation of state and opacity 7 1 23 4 real gamma This optional information parameter can be specified with real gamma f E15 8 b 4 n Adiabatic coefficient u 1 amp c0 0 0 1 6666666666666 1 4 0 0 It has no practical consequences because the actually used chemical composition is determined by the files for equation of state and opacity 7 1 23 5 real cradkappasmooth In the LHDrad module the opacity along each ray can be smoothed The amount of smoothing can be set e g with real c_radkappasmooth f E15 8 b 4 n Opacity smoothing parameter u 1 amp c0O 0 0 no smoothing 0 25 light smoothing 0 666 strong smoothing 0 0 The smoothing can perhaps reduce the noise in the intensity images somewhat but has no general beneficial effect and should usually not be used 7 1 PARAMETER FILE RHD PAR 163 7 1 23 6 real c_radtsmooth In the LHDrad module the 3D temperature array can be smoothed The amount of smoothing can be set e g with real c_radtsmooth f E15 8 b 4 n Temperature smoothing parameter u 1 amp cO 0 0 no smoothing 0 5 reasonable smoothing 1 0 max smoothing 0 0 The smoothing can sometimes reduce the noise in the intensity images but causes amplifies some anomalies of the radiative G
222. n d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Expansion coefficient u 1 real s_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Entropy u erg K g real s_xmean2 d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Entropy u erg K g real rhos_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Entropy u erg K cm 3 real vi_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Velocity radial amp u cm s real v2_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Velocity azimuthal u cm s real v3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Velocity vertical amp u cm s real vi_xmean2 d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Velocity radial amp u cm s real v2_xmean2 d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Velocity azimuthal amp u cm s real v3_xmean2 d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Velocity vertical u cm s real rhovi_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Mass flux radial amp u g cm 2 s real rhov2_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Mass flux azimuthal u g cm 2 s real rhov3_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 n Mass flux vertical amp 174 CHAPTER 8 OUTPUT AND STATUS FILES u g cm 2 s real rhovivi_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Momentum flux 11 radial u g cm s 2 real rhov2v2_xmean d 1 128 1 1 127 127 f E13 6 p 4 b 4 amp n Momentum flux 22 azimuthal u g cm s 2 real rhov3v3_xmean d 1 128 1 1 127 127 f E
223. n the master directory will typi cally be HOME for this is the default created by the tar file However you might prefer to put the files into HOME CO5BOLD or HOME CO5BOLD VersionNumber instead 2 Put all source files and the configure script there This will be done typically by expanding the gzipped tar file for tar gz e g with tar zxvf for tar gz or by copying all files from an existing installation On a restricted UNIX you might be forced to use gunzip for tar gz tar xvf for tar 33 34 CHAPTER 4 COMPILATION amp INSTALLATION instead Unpacking the tar file creates a sub directory for in the local directory and possibly overwrites existing files You get sub sub directories as described in Sect 3 1 and files as listed in Tables and 3 3 See the Readme file for README Change with cd for hd rhd into the main directory Look at the existing sub directories e g with ls og grep da to see if you find one that fits your machine The directory for hd rhd conf should not be used It contains only the configure script But any other directory will do If you don t like any of the existing directories or there are none create your own e g with mkdir YOUR_MACHINE Change into this directory with cd YOUR_MACHINE Check if there is a configure script or a link to it with ls og configure which should give something like lrwxrwxrwx 1 17 2014 01 07 15 15 configure gt co
224. n up to 22 processors on the machines of the physical Fluids Facility UKAFF in Leicester England UKAFF operates two machines an SGI Origin 3800 with 128 processors named ukaff and an older SGI Origin 2000 with 22 processors named grand which is mainly used for development and test purposes Both machines are binary compatible At the time of testing April 2003 the SGI MIPSpro Compilers Version 7 4 was installed Most of the compiler switches given in the previous section were used except for the following modi fications which either gave empirically a better performance or were recommended by the UKAFF Hints for users 4 6 SPECIFIC MACHINES amp COMPILERS 67 e Ofast Replaces 03 gave better performance e LNO cs1 32k 1s1 32 cs2 8M 1s2 128 Explicit cache architecture added The option Ofast is now the default selected by the configure script for all SGIs with IP35 architecture The cache architecture settings are activated for the UKAFF machines only A glitch in the system libraries made it necessary to add a work around to the source code file rhd F90 A bus error occurred whenever the system routine flush was trying to flush an empty file buffer The temporary work around was simply to add a write statement before every call of flush This made the log file look less nice but did the job Now the few flush statements that are not necessarily preceded by a write statement are removed
225. nMP directives dis able auto parallelization Onoinline Disables inlining This can simplify things With a proper choice of routine versions inlining is not really necessary anymore 03 0limit General optimization with limited resource usage during compilation Some modules should only be compiled with 02 others compile even with 03 Onolimit The UIO modules and the string handling module should be compiled in debug mode A proposed compiling sequence is MSrad does not compile all other modules are activated export F90_LHDRAD 1 export F90_MSRAD 0 export F90_SHORTRAD 1 export F90_DUST 1 export F90_MHD 1 export F90_PARALLEL openmp export F90_DEBUG 1 configure make UIO STR export F90_DEBUG 0 configure make 4 6 4 Hewlett Packard Itanium 2 The 2 processor system gunnar from Hewlett Packard is a dual Itanium 2 machine with two 900MHz ia64 CPU modules 4GB of RAM and 70GB user disk space The single processor performance of CO5BOLD is very good On two processor the code runs even faster but just stops after a few time steps The number of time steps varies even for simulations with the very same start model and parameter file Therefore OpenMP should not be activated currently The compiler settings are somewhat similar to the settings of the HP V2500 system in Section 4 6 3 U77 Link proper library to make the machine understand e g call flush 6 cpp yes Switch on the C preprocessor No
226. nd VAweno HD module only 7 1 8 5 real c_gravmu The time centering of the density that is used for the computation of the gravitational acceleration can be selected e g with real c_gravmu f E15 8 b 4 n Gravity time centering u 1 amp c0O 1 0 use defaults depending on time integration scheme amp c1i 0 0 density at old time step 0 5 centered 1 0 new time step 0 5 A value of 0 0 is the default for Runge Kutta type time integration The others use 0 5 However a larger value the maximum is 1 0 leads to damping of oscillations in a stratified atmosphere This is due to the fact that in a normally stratified atmosphere where the density increases with depth the density in any given grid cell usually increases with time during an upward motion of course the divergence of the flow field plays a role too Using the density for the computation of the downward directed gravitational acceleration at a slightly later time increases this value leading to a stronger decceleration of the upward motion This works analogously for downward motions The parameter is recognized by the HD and the MHD module 120 CHAPTER 7 INPUT AND CONTROL FILES 7 1 8 6 integer n_hyditer After each complete hydrodynamic time step the recommendation for the next time step will be chosen so that n_hyditer iterations will probably needed The parameter can be set e g with integer n_hyditer f 14 b 4 amp n Number of hydro
227. nf configure If it is not there create the link with In s conf configure Start the configure script to create the first version of the Makefile with configure A partly colorized output can be generated with configure c This gives you a screen output like Configuration script for CO5BOLD Makefile No configurerc file found Writing template configurerc Checking default settings for environment variables 4 2 COMPILATION PROCEDURE FOR CO5BOLD No compiler No parallelization No debugging No LHDrad module No MSrad module No SHORTrad module No chem module No hion module No dust module No MHD module No TWEAK module No explicit machine No explicit path specified requested requested requested requested requested requested requested requested requested requested specified specified assuming assuming assuming assuming assuming assuming assuming assuming assuming assuming assuming assuming List of control environment variables F90_COMPILER F90_PREFLAGS F90_POSTFLAGS F90_PARALLEL scalar F90_DEBUG F90_LHDRAD F90_MSRAD F90_SHORTRAD F90_CHEM F90_HION F90_DUST F90_MHD F90_TWEAK F9O_MACHINE local gt MACHINE 1686 MACMODEL Intel F90_BASEPATH home ll WH ooo System and compiler Pentium bi for info Linux system with i686 architecture PGI compiler version 3 3 2 Compiler call F90_COMPILER default default
228. nfigure script are also recognized see the header of the UIO configure script The command make install generates a directory HOME local and sub directories An init script is put into HOME bin And the resource files cshrc and bashrc are modified to call it Therefore this installation step is potentially dangerous because its effect is not restricted to the local directory 94 CHAPTER 6 DATA FILE TYPES 6 2 6 2 Quick examination of files uiolook The shell script uiolook calls the Fortran program uiolok f90 The man page UIOLOOK 1V Misc Reference Manual Pages UIOLOOK 1V NAME uiolook print entry headers of file in uio form SYNOPSIS uiolook h p filename AVAILABILITY DESCRIPTION The routine uiolook reads each filename file in uio form in sequence and displays the headers of the entries in pretty form OPTIONS h Print usage of uiolook p Entry header keywords in long pretty form Sun0S 5 5 1 Last change 27 November 1996 1 6 2 6 3 Transformation of files uiocat The shell script uiocat calls the Fortran program uiocat f90 The man page UIOCAT 1V Misc Reference Manual Pages UIOCAT 1V NAME uiocat concatenate file s in uio form SYNOPSIS uiocat c conversion f format h 1 copylist o outputfilename filename DESCRIPTION The routine uiocat reads each filename file in uio form in sequence and displays its contents formatted on standard
229. nfile_start los opafile 115 opapath outconv_end outconv_fine outconv_full outconv_mean outfile_chu1 159 outfile_chu2 159 outfile_chu3 159 outfile_end 158 outfile_fine 163 outfile_full character outfile_mcyl character outfile_mean character outform_end character character character character character outform_fine outform_full1 159 outform_mean radpressure 163 radraybase character radraystar 146 character radschene character reconstruction 118 character character character character side_bound side_bound_mag_x1 112 side_bound_mag_x2 112 top_bound integer integer integer integer integer integer integer integer integer integer integer integer 130 integer integer integer integer integer integer integer integer integer integer integer integer integer integer integer integer integer integer integer INDEX n_outslicedim_mean n_dustgrainradius n_hydcellsperchunk n_hydcellsperchunk2 21 n_hydcellsperchunk3 121 n_hyditer 120 n_hydmaxiter 120 n_hydrkiter 122 n_magdiffbotton 133 n_magdiffside 132 n_magdifftop 132 n_orderconstrainedtransport n_radband 144 n_raditer n_radmaxiter n_radminiter n_radoutput 149 n_radphi n_radrsyslevel n_radsubray 143 n_radtaurefine 149 n_radtheta n_radthickpoint 148 n_rescellsperchunk 131 n_viscellsperchunk n_visiter 133 outdim_chul out
230. ng this variable to 1 will set F90_DUST 1 The compiler is then called with Drhd_chem01 4 3 1 12 F90_HION HION module time dependent hydrogen ionization e 0 do not activate compile and link this module default e 1 activate this source step module Setting this variable to 1 will set F90_DUST 1 The compiler is then called with Drhd_hion01 4 3 1 13 F90 DUST DUST module e 0 do not activate compile and link this module default e 1 activate this source step module If this variable is set to 1 the compiler is called with Drhd_box_quc01 1 see Sect 4 4 1 6 40 CHAPTER 4 COMPILATION amp INSTALLATION 4 3 1 14 F90_MHD MHD module e 0 do not activate compile and link this module default e 1 activate this magnetohydrodynamics module MHD HLL solver If CO5BOLD is compiled with the MHD module your start model should include magnetic fields oth erwise zero magnetic fields are created and used In the latter case the magnetic field arrays are not written into the output files 4 3 1 15 F90 TWEAK TWEAK module e 0 do not activate compile and link this module default e 1 activate the TWEAK module rhd_tweak_module F90 e rhd_tweak_name_module activate the TWEAK module with this name A TWEAK module is a user provided set of routines performing some simple but non standard task 4 3 1 16 F90 MACHINE y Explicit machine specification This is usually not necessary use local or instead e
231. ntel on Linux Pathscale on NEC on SGI on Sun thread affinity operator splitting output chunk data sets 168 full data sets 167 HION 174 mcyl data 172 mean data 168 PathScale PGI precision double single que B9 2 16 radiation transport README rhd cont 166 rhd dump 166 rhd exe rhd out 174 rhd par boundary conditions character bottom_bound character bottom_bound_mag 113 character centrifugal_force 105 character chem_reacfile 138 character chem_reacpath character description 102 character dustreconstruction 138 character dustschene 137 dust_bins_01 141 dust_k3mon_03 dust_moment04_c2 character eosfile 114 character eospath 115 character file_id 102 character grav_mode 103 character hdcheckf lux 130 character hdcoredragprofil character hdcoreheatprofil character hdenthalpyavgmode character hdentropywavemode 126 character hdscheme character hdsplit 202 character hdtimeintegrationscheme 1177 character hdtmpstructkeepmode 120 character hdtransvelomode 126 character heat_mode 107 character hion_abufile 139 character hion_atomfile 139 character hion_datapath 139 character character character character character character character character character character character character character character character character hion_edensfile 139 hion_pffile 139 history i
232. nts e g 2D models An example is given for the Hitachi SR8000 in Sect 4 6 5 7 1 9 Hydrodynamics control HD only 7 1 9 1 integer n hydcellsperchunk2 Only for the HD solver and hdsplit CTU the chunk size in 2 direction can be specified independently The default is to used integer n_hydcellsperchunk The approximate number of grid cells per chunk can be specified e g with integer n_hydcellsperchunk2 f 19 b 4 amp n Number of cells per hydro chunk 2 amp cO around 2400 or 1 0 default use n_hydcellsperchunk 1 The exact number is determined at run time to get approximately equal sizes of the individ ual chunks The choice of this parameter does not affect the result of the computation but the memory usage and performance similar to integer n_hydcellsperchunk However as accesses to chunks in 2 direction span many memory pages the access time is longer than for properly aligned chunks in 1 direction and somewhat larger twice values might be optimal Alternatively a value of n_hydcellsperchunk2 1 causes a two stage access where first an entire 2D slice is trans posed and copied to achieve properly alignment and then the normal chunk size specified with integer n_hydcellsperchunk is used in a consecutive step 7 1 9 2 integer n_hydcellsperchunk3 Only for the HD solver the chunk size in 23 direction can be specified independently The default is to used integer n_hydcellsperchunk The approximate numbe
233. oduced A messages like BECCA CR I AIR I OKI ICA IKK I A 1 21 1 2 4 4 21 1 21 kkk kkk kk kk kk kkk kk Severe error SHORTRAD Time step below absolute limit Error index 100 Interrupt computation FEA AAA AAR I ICICI I I I I I KK 21 21 21 21 21 1 3 A ooo o 2 2 AC ACA kk kkk kkk kkk k k kkk marks an exit with an error and without rhd done file A message about the final model like ACTION Write final model lt lt lt lt lt lt lt lt Model file rhd end opened on channel 12 is followed by some timing information like e g Timing statistics rate x factor 1000000 x 10000 Process Samples Total time Mean time sec sec RHD code 1 410 830017 410 830017 uio output routines 27 37 469997 1 387778 HYD bound_3DCenter 2000 3 540000 0 001770 Hydrodynamics routines 2000 48944 660156 24 472330 HYD 1 2000 16350 610352 8 175305 HYD 2 2000 16052 459961 8 026230 HYD 3 2000 16520 798828 8 260400 Viscosity routines 3D 2000 25446 400391 12 723200 VIS make_box modelvis 2000 0 010000 0 000005 VIS copy_box modelvis 2000 1750 960083 0 875480 VIS delete_box modelvis 2000 0 000000 0 000000 Radiation transport routines 2000 243729 000000 121 864502 SHC step 2020 244064 515625 120 824020 SHC step dtime init EOS 16024 49312 738281 3 077430 SHC step dtime explicit 16024 174542 343750 10 892558 SHC formal 16024 170085 437500 10 614418 SHC formal init 16024 35591 378906 2 221129 SHC formal dirloop 16024 133010 687500 8 300717 SH
234. of information to standard output which is usually directed into rhd out the output contains After the header there is a block Compiler call e g 8 6 TEXT OUTPUT RHD OUT pgf90 byteswapio fast Mvect sse Mcache align Minfo inline Minline rhd_hyd_a vg rhd_hyd_upwind rhd_hyd_pred0 rhd_hyd_predm rhd_hyd_predp rhd_hyd_alpha rhd_h yd_constanteq rhd_hyd_minmodeq rhd_hyd_minmod rhd_hyd_vanleereq rhd_hyd_vanleer rhd_hyd_superbeeeq rhd_hyd_superbee rhd_hyd_ppeq rhd_hyd_pp rhd_hyd_hdflux rhd _hyd_entropyfix Minline rhd_rad3d_raylhd rhd_rad3d_solve rhd_rad3d_solveeq rhd _shortrad_operator rhd_shortrad_dtauop Drhd_hyd_roeid_101 0 Drhd_r02 Drhd_r0 3 DMSrad_raytas1 Drhd_hyd_entropyfix_p0i 1 Drhd_roeid_step_t01 Drhd_roeid_f lux_t01 Drhd_vis_t01 Drhd_bound_t01 Drhd_shortrad_step_t01 Drhd_shortrad_fo rmal_t01 Drhd_shortrad_lambda_t01 These lines were produced by the configure script see Sect 4 3 and written into the file compiler_flags info 175 which is accessed from rhd F90 via include during compilation Various modules now have a routine XXX_SwitchInfo that prints the values of the compiler switches used during the compilation of that particular module The output can look e g like Compiler switches rhd_hyd_module rhd_hyd_gravcorr_p01 rhd_hyd_entropyfix_p01 rhd_hyd_upwind_p01 rhd_hyd_roeid_101 rhd_roeid_step_101 rhd_roeid_slope_101 rhd_roeid_flux_101 rhd_bound_t01 rhd_roeid_flux_t01 rhd_ro
235. oint With the MSrad module the lower part of the model can be computed in diffusion approximation The number of points in diffusion approximation can be set with e g integer n_radthickpoint f I4 b 4 amp n Number of grid points with optically thick diff approximation amp cO 0 no diffusion approximation 0 The value should be choosen so that for all points in that region Ar gt 1 is valid Setting this value to O means that the diffusion approximation is not used in any part of the model 7 1 PARAMETER FILE RHD PAR 149 7 1 17 5 integer n_radtaurefine With the LHDrad and the MSrad module the number of points on the rays can be finer than the number of points in the basic numerical grid The refinement can be set e g with integer n_radtaurefine f 14 b 4 amp n Refinement factor 0 7 1 17 6 integer n_radrsyslevel This parameter specifies the zero point of the ray system default 0 MSrad only The parameter is specified with e g integer n_radrsyslevel f 14 b 4 n Zero index of ray system amp c0 0 default amp 0 7 1 17 7 integer n_radoutput This parameter controls additional output into the file rhd qrad default 0 MSrad only The parameter is specified with e g integer n_radoutput f 14 b 4 n Output level of MSrad amp c0 0 default amp 1 7 1 17 8 real c_radtcool Parameter for surface cooling option N_radband lt 0 of MSrad It can be activat
236. on Usual if then else constructs and do loops should be indented with 2 blanks per level as for instance in do i3 m3 n3 do i2 m2 n2 do ii m1 n1 rho i1 i2 i3 model rho i1 i2 i3 end do il end do i2 end do i3 or if Copyrho_flag then Copy original rho array into array with buffer zones rho m1 n1 12 13 model rho m1 n1 i2 i3 Copy original quc array into array with buffer zones do iquc 1 nquc quc mi n1 i2 1i3 iquc modelkquc mi n1 i2 1i3 iquc end do iquc endif Copyrho_flag or if time_flag gt 0 then boxout itime box itime boxout time box time boxout time_db box time_db endif time_flag gt 0 or Set default value if present grid_flag then grid_flag0 grid_flag else grid_flag0 1 endif 5 2 4 Further recommendations To save space for the alignments of assignments headers of files modules subroutines or programs should not be indented Usually there should be no blanks around the in an assignment However in some cases they can be inserted to improve readability Likewise a blank after a comma in parameter lists is inserted in some but not all cases In if then else constructs the new comparison operators are preferred ober the old ones i e instead of eq A single space is used before and after the comparison operator The general outline should be if Copyrho_flag then if time_flag gt 0 then if ierr 0
237. one term from the input line exmtrm Transform a list of items into its components 96 CHAPTER 6 DATA FILE TYPES o ELICON Determine file contents list of all entries with its positions A getenv Get information about environment yanit Initialization procedure for input output routines meitrm Merge the input term keyword value gt keyword value memtrm Merge a list of terms keywords and their values into a line table mkcvls Make list with possible conversion types y a nc2nt From column number or entry name find table entry number openrd Open file for reading read header openwr Open file for writing write header pptemt Print term table in pretty form H qmaadd Transform a string into a string with quotation marks if necessary qmadel Parse string inline and remove quotation marks if necessary o ls Reading scalar and array data of all types gt a Edito Read file header rdhdex Read header of variable and extract keywords rdhead Read header gt rdilabli Read label sa rdtab Read table of integer real and or character data from file skipda Skip data block jz sihdex Search header of variables given by list and extract keywords y St2dim Parse dimension string struct_rd Read uio file and put data into anonymous structure tabo Create empty table structure t tabe Change and modify table contents rearrange lines 5 tabm Merge two tables in
238. only in case of an emergency and C_hydTdiffMach 1 0 or 2 0 as a default These parameters are not recognized by the MHD module 7 1 10 Hydrodynamics control MHD only The following parameters apply only to the MHD module see also Sect 2 2 for details 7 1 10 1 character hdcheckflux With this parameter the CheckFlux routine of the HLLMHD solver can be des activated as e g in character hdcheckflux f A80 b 80 n Switch to activate checking of MHD fluxes amp c0 on off off This parameter is only recognized by the HLLMHD scheme Leaving it on might be safer but is definitely slightly slower 7 1 10 2 integer n_orderconstrainedtransport Order of reconstruction of the electric field in the constrained transport step The parameter can be set e g with integer n_orderconstrainedtransport f 14 b 4 amp n Number of hydrodynamics iterations amp cO order of reconstruction of electric field in constrained transport step amp ci 1 Simple arithmetic average default 2 Quadratic interpolation 2 Possible values e 1 Simple arithmetic average of fluxes default e 2 Quadratic interpolation of fluxes to the cell edges This parameter is only recognized by the hdscheme HLLMHD 7 1 PARAMETER FILE RHD PAR 131 7 1 10 3 integer n_rescellsperchunk The approximate number of grid cells per chunk in the 3D resistivity scheme can be specified e g with integer n_rescellsperchunk f 19 b 4 amp n Nu
239. ontrol environment variables The environment variables that control the script are listed in the following It is convenient to put them into the configure resource file configurerc that is read by the configure script 38 CHAPTER 4 COMPILATION amp INSTALLATION 4 3 1 1 F90 COLOR Activate color output of the configure script e 0 standard black amp white output e 1 color output 4 3 1 2 F90 COMPILER Fortran compiler e g e a machine dependent default is chosen individually for each architecture e 90 general default e gfortran GNU compiler e ifort Intel compiler See Sect 4 6 for a more complete list and further details 4 3 1 3 F90 PREFLAGS Compiler flags to be put at the beginning of the list Usually the list of compiler flags produced by the configure script should be pretty complete But you might want to add special switches like Bstatic to enforce static linking of libraries e no extra flags 4 3 1 4 F90 POSTFLAGS Compiler flags to be put at the end of the list Usually the list of compiler flags produced by the configure script should be pretty complete However you might want to overwrite some settings This can be done by setting this variable to a none empty value because typically a compiler should interpret the flags from left to right e no extra flags 4 3 1 5 F90 PARALLEL Parallelization scheme e scalar no parallelization default e openmp OpenMP appropr
240. ore calling configure e Q Q To activate inlining and to specify the list of routines that should be inlined see Sect 4 5 4 e qsmp noauto omp Parallelization OpenMP directives are activated A job script rhd job on the Loadleveler batch system on io cines fr can be submitted with llsubmit rhd job 4 6 SPECIFIC MACHINES amp COMPILERS 61 The jobs in the queue for user testuser can be checked with llq u testuser A job with ID n34 56789 0 can be cancelled with llcancel n34 56789 0 4 6 7 Linux PGI compiler Under Linux the compiler of the Portland Group was first used to compile CO5BOLD It is called with pgf90 Important switches are e byteswapio With this flag set binary files in big_endian format the standard for UIO files are automatically transformed to little_endian and vice versa e fast General optimization flag to choose close to optimum optimization for local machine e Mvect sse Optimization Allow Pentium III vector commands e Mcache align Optimization Align some data object on cache line boundaries e fastsse From compiler version 4 0 on this option can be used instead of the three previous ones It contains and supersedes them e Minline Optimization the routines that should be inlined are listed in Sect 4 5 4 e DMSrad_raytas 2 Optimization choose non default version of loop in SUBROUTINE raytas in file MSrad3D F90 See Sect 4 4 7 20 e Drhd_hyd_roe1d_101 0 Optim
241. ors do not appear in the MHD equations Therefore one has to multiply the original magnetic fields in gauss with the factor 1 V Ar in order to get the correct magnetic field strength for CO5BOLD After the computation one has to multiply the magnetic fields from the COSBOLD output with the factor vAr in order to get the magnetic field strength in gauss The CO5BOLD analysis tool CAT does this automatically when reading the model data so that CAT outputs the field strength in gauss Positivity of pressure and density A special problem of MHD simulations is that pressure or density can become negative in some cir cumstances This problem is also present in pure hydrodynamic simulations but gets worse for MHD The original hydrodynamic version of CO5BOLD tries to fix this problem by reducing the time step In hydrodynamics this works in most cases In MHD however reduction of the time step often does not help and other methods are necessary to avoid this problem Therefore the MHD module uses a HLL solver instead of a Roe solver which is used in the hydrodynamic module 1986 It was shown numerically by 2000 that using a HLL solver together with additional source terms in the induction equation keeps pressure and density positive under all circumstances Because the constrained transport step which is performed after the 1D sweeps with the MHD solver changes the magnetic field a correction of the internal energy in each cell is necessary
242. ort equation along single ray This routine is called very frequently The timing measurement might slow it down somewhat It should not be used in conjunction with OpenMP Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 7 8 rhd rad3d dir t01 rhd radiation 3 dimensions direction timing 01 in rhd_lhdrad_module F90 Category additional output Produce timing information for the routines which solves the radiation transport equation for one direc tion field The timing measurement are called very frequently and might slow down the code It should not be used in conjunction with OpenMP Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 7 9 rhd rad3d step t01 rhd radiation 3 dimensions step timing 01 in rhd_1hdrad_module F90 Category additional output Produce timing information with main 3D radiation transport routine It can be used together with OpenMP and should cause no noticeable performance loss Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 7 10 rhd_shortrad_operator_101 rhd short characteristics radiation operator loop 01 in rhd_shortrad_module F90 Category performance enhancement selection of approximation Choose type of short characteristics operator The operators usually come in pairs 1 2 3 4 5 6 The
243. ose filename model txt uio_data mode close family mod2 uio_data mode allclose of UIO files 98 CHAPTER 6 DATA FILE TYPES 6 2 7 3 Reading data with uio_dataset_rd pro or uio_datasetlist_rd pro For a detailed description of how to handle UIO files in IDL see Sect With the new IDL routines uio_struct_rd pro uio_dataset_rd pro and uio_datasetlist_rd pro files are not read entry by entry anymore but in larger blocks or data sets With uio_struct_rd all entries in a file are read and put into an IDL structure variable This is appropriate for the CO5BOLD parameter file or for the UIO table file in Sect 6 2 3 3 e g par uio_struct_rd st35gm04n05_03 par atm uio_struct_rd holmu atm When groups of entries in an UIO file are properly marked with label dataset and label enddataset delimiters confer the example in Sect 8 1 each group can be accessed with uio_dataset_rd The first block can be read with ful uio_dataset_rd st35gm04n05_03 full or ful uio_dataset_rd st35gm04n05_03 full ndataset 0 Dataset number i 1 counting starts at zero can be read with ful uio_dataset_rd st35gm04n05_03 full ndataset i If a dataset with that number does not exist an empty structure is returned In this case when called with additional keywords like ful uio_dataset_rd st35gm04n05_03 full ndataset i outstr outstr ierr ierr an error message is returned in outstr
244. p Terms higher order in time are provided by the Roe solver depending on the order of the reconstruction scheme e Hancock default for MHD HLLE Terms of second order in time are approximated by a Hancock predictor step e Euleri only for MHD A single Euler step is used which is only first order in time e RungeKutta2 A two step predictor corrector Runge Kutta step is used e RungeKutta3 A three step Runge Kutta step is used For possible combinations see Tab 7 1 7 1 8 3 character hdsplit With this parameter the type of the hydrodynamics operator directional splitting scheme can be specified as in character hdsplit f A80 b 80 n Hydrodynamics directional splitting scheme amp c0 123 directional splitting default amp c1 unsplit unsplit direct operator amp c2 CTU Colellas Corner Transport Upwind scheme Colellal 1990 123 Possible values are e 123 default The standard directional splitting is activated where the 1D operators for the individual directions are applied in the given order So far only the order 123 is possible e unsplit The standard solver is applied However the changes from the individual steps are computed from and applied to the same model configuration The result is an unsplit scheme 118 CHAPTER 7 INPUT AND CONTROL FILES e CTU Use Colella s Corner Transport Upwind scheme CTU see 1990 It first com putesand stores the changes fro
245. parameters to facilitate the testing of new features They can be used anywhere in the code but only for a limited time see above The parameter can be set e g by real c_testi f E15 8 b 4 n 1st real test parameter 1 0 7 1 22 5 character strtest1 The string parameters strtest1 to strtest5 are general purpose parameters to facilitate the testing of new features They can be used anywhere in the code but only for a limited time see above The parameter can be set e g by character strtesti f A80 b 80 n 1st character test parameter model 162 CHAPTER 7 INPUT AND CONTROL FILES 7 1 23 Additional information and obsolete parameters 7 1 23 1 real abux This optional information parameter can be specified with real abux f E15 8 b 4 n hydrogen abundance number fraction u 1 amp cO standard solar mixture 0 90851003E 00 It has no practical consequences because the actually used chemical composition is determined by the files for equation of state and opacity 7 1 23 2 real abuy This optional information parameter can be specified with real abuy f E15 8 b 4 n helium abundance number fraction u 1 amp cO standard solar mixture 0 90850003E 01 It has no practical consequences because the actually used chemical composition is determined by the files for equation of state and opacity 7 1 23 3 real qmol This optional information parameter can be specified with real qmol f E15 8 b 4
246. provement for low Mach number flows is significant This parameter is not recognized by the MHD module 7 1 PARAMETER FILE RHD PAR 123 7 1 9 5 real c_hydlowmachcsbase For very low Mach numbers the over sensitive sound wave detection of the Roe solver for 2D and 3D cases can be suppressed by choosing a non zero value for real c_hydlowmachcsfactor With real c_hydlowmachcsbase a minimum value can be chosen as e g in real c_hydlowmachcsbase f E15 8 b 4 amp n Low Mach Number sound speed reduction base value amp c0 lt 0 0 off old settings 0 001 0 02 reasonable values 0 001 Typical choices are e 0 0 The extra reduction factor is not applied This is the standard Roe scheme It is still the recommended default excepd for very low Mach number flows lt 1 0E 06 Dangerously small values 1 0E 06 Default e 0 001 to 0 02 Reasonable values e 1 0 Switch off the low Mach number sound speed reduction 7 1 9 6 real c_hydsmallfluctfactor In various equations in the Roe solver an estimate of the relative size of fluctuations is made With real c_hydsmallfluctfactor a scaling factor can be chosen to fine tune the regime of the small fluctation treatment as e g in real c_hydsmallfluctfactor f E15 8 b 4 amp n Small large fluctuation estimate parameter amp c0O lt 1 0 smaller relative fluctuations 1 0 default gt 1 0 larger fluctuations 1 0 Typical choices are e lt 1 0 Extend th
247. r 0 5 are reasonable Although the underlying formula and theory is more complex the effects are rather similar to that of real c_visp2pcoeff If additional smoothing is required either of these parameters or both can be set to non zero values 136 CHAPTER 7 INPUT AND CONTROL FILES 7 1 11 12 real c_visp2phypartificial This parameter can be set with e g real c_visp2phypartificial f E15 8 b 4 amp n Artificial point to point tensor viscosity parameter u 1 0 0 This parameter is equivalent to real c_visartificial see 7 1 11 3 with the classical implemen tation of the viscosity tensor A value of 0 0 switches it off Values of 0 3 to 1 0 are reasonable The viscosity controlled with this parameter is meant to act mostly on shocks 7 1 11 13 real c_visp2phypexpansion This parameter can be set with e g real c_visp2phypexpansion f E15 8 b 4 amp n Parameter for point to point expansion tensor viscosity u 1 0 0 This parameter is equivalent to real c_visexpansion see 7 1 11 4 with the classical implementation of the viscosity tensor A value of 0 0 switches it off The viscosity controlled with this parameter is meant to limit or smooth strong expansion events where density pressure temperature and or entropy can drop significantly This parameter is not frequently set to non zero values 7 1 11 14 real c_visp2pdivrhov This parameter can be set with e g real c_visp2pdivrhov f E15 8 b 4 amp n Point to po
248. r example on a CRAY one typically wants to use most of the CPU time given for an individual batch job In this case one can set e g real cputime_remainlimit 2000 0 and the values for the other halt conditions to 1 0 or 1 7 1 PARAMETER FILE RHD PAR 151 7 1 19 1 real starttime The start time of a simulation is usually taken from the start model file But sometimes is simulation is to be started with the final model of a previous run but should start at time 0 0 This can be achieved by setting the start time with real starttime f E15 8 b 4 n Start time u s 0 0 Allowed values are e gt 0 0 Set the initial time of the simulation to this value and override value from start model e lt 0 0 default Take the initial time from start model 7 1 19 2 integer starttimestep The start time step count of a simulation is usually taken from the start model file But sometimes is simulation is to be started with the final model of a previous run but should start at time step 0 This can be achieved by setting the start time step count with integer starttimestep f I11 b 4 n Start time step number u 1 0 Allowed values are e gt 0 Set the initial time step of the simulation to this value and override value from start model e lt 0 default Take the initial time step count from start model 7 1 19 3 real cputime Because of the long simulation time usually CO5BOLD will run in some sort of batch mode which might impose
249. r of grid cells per chunk can be specified e g with 122 CHAPTER 7 INPUT AND CONTROL FILES integer n_hydcellsperchunk3 f I9 b 4 amp n Number of cells per hydro chunk 3 amp cO around 2400 or 1 0 default use n_hydcellsperchunk 1 The exact number is determined at run time to get approximately equal sizes of the individ ual chunks The choice of this parameter does not affect the result of the computation but the memory usage and performance similar to integer n_hydcellsperchunk However as accesses to chunks in 2 direction span many memory pages the access time is longer than for properly aligned chunks in 1 direction and somewhat larger twice values might be optimal Alternatively a value of n_hydcellsperchunk3 1 causes a two stage access where first an entire 2D slice is trans posed and copied to achieve properly alignment and then the normal chunk size specified with integer n_hydcellsperchunk is used in a consecutive step 7 1 9 3 integer n_hydrkiter In the case of hdscheme Roe and hdtimeintegrationscheme RungeKutta2 and only there the default number of Runge Kutta sub steps can be increased relative to the default value 2 to improve the performance in the case of a large ratio of radiative to hydrodynamical time scales The parameter can be set e g with integer n_hydrkiter f I9 b 4 amp n Number of Runge Kutta sub steps amp c0 2 default 3 some acceleration 3 Reasonabl
250. racter tables with columns of type integer real single precision or character or structuring information labels Each entry consists of the header and the possibly empty data block Each header is a list of at most 20 terms separated by blanks or linefeeds The first term is the entry type e g real see table 6 3 followed by an identifier This identifier should follow the standard rules for variables lowercase letters numbers underscore starting with letter It is a name as e g rho v_1 The rest of the terms come in the form keyword value See Tab for some pre defined keywords A header line has a maximum length of 80 characters A continuation line is indicated by amp at the end of the line A header consists of 20 lines at maximum It can be preceded by empty lines except for the file header entry Example real time f F9 2 b 4 n Time u s cO Simulation time in seconds amp ci Time count starts at 0 0 12 34 The entry header is followed by the entry data block This block is empty for labels and the fileform entry but non empty otherwise 6 2 UIO DATA FORMAT 87 entry type entry contents fileform file description first entry integer scalars 1D 4D arrays real scalars 1D 4D arrays single amp double precision complex scalars 1D 4D arrays single precision character scalars 1D 4D arrays table table with integer real character columns label lab
251. racteristics radiation lambda loop 01 in rhd_shortrad_module F90 Category feature activation Handling of extra arrays to allow partially implicit Lambda iteration Values e 0 default Only fully implicit Lambda iteration allowed or fully explicit treatment e 1 Also partially implicit Lambda iteration allowed 4 4 7 18 rhd shortrad formal t01 rhd short characteristics radiation formal timing 01 in rhd_shortrad_module F90 Category additional output Produce timing information for routine which gives the formal solution of the radiation transport equation with the help of short characteristics It can be used together with OpenMP and should cause no noticeable performance loss Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 7 19 rhd_shortrad_step_t01 rhd short characteristics radiation step timing 01 in rhd_shortrad_module F90 Category additional output Produce timing information for main short characteristics routine It can be used together with OpenMP and should cause no noticeable performance loss Values e undefined default no timing information e defined call subroutines to measure elapsed time 4 4 7 20 MSrad_raytas Matthias Steffen radiation ray tau s in MSrad3D F90 Category performance enhancement Values e 0 default Loop with IF THEN ELSE e 1 Loop with ABS SIGN e 2 Loop with MIN MAX 52 C
252. rchunk 4 6 SPECIFIC MACHINES amp COMPILERS 59 Performance test on Hitachi SR8000 at HLRS e e 128x128x192 3 time steps 1000 En O Dz E S 1005 a nes E Q N Cc an A J A 10 it 1 Ll ssal Lu Os 104 10 108 chunk size 300 E 4 2 200 E E R 5 100 7 Le E gt E 000 E el 900 SOOT taaria emi ad OS 10 10 108 chunk size O J E x J E 2 O oat 0 0 R 1 es EG VT 1 ae Be eae ee L vac 05 10 105 108 chunk size Memory norm norm CPU time norm WCT VIS rout A A 252x252x188 3 time steps 1 0 ost 0 5 0 4 0 25 0 0 004 T A 10 105 chunk size 10 109 chunk size 105 104 chunk size Figure 4 1 Performance tests on Hitachi SR8000 at HLR Stuttgart For models with 128x128x192 and 252x252x188 grid cells different values for the hydrodynamics and viscosity chunk size parameters were used See text for more details 60 CHAPTER 4 COMPILATION amp INSTALLATION see Sect and Sect 7 1 11 17 Two different models have been used one consisting of 128x128x192 grid cells the other of 252x252x188 respectively Grey radiative transfer has been performed with the MSrad module Different values for the chunk size s have been assumed where the hydrodynamics and the viscosity parameter were set equal In all cases three time steps have been computed The res
253. re is a development from 1 2 over 3 4 to 5 6 towards higher stability Both members of each pair should do the same operation but use different ways to do a case distinction The even operator has in some cases the better performance But the odd operator might be saver to use Values e 0 simple test operator fast but results are utterly useless e 1 case distinction with if then else construct e 2 case distinction with masks weights 0 0 or 1 0 e 3 case distinction with if then else construct slope reduction of source function e 4 case distinction with masks weights 0 0 or 1 0 slope reduction of source function e 5 default case distinction with if then else construct modified slope reduction of source func tion e 6 old default case distinction with masks weights 0 0 or 1 0 modified slope reduction of source function 8 test version 50 CHAPTER 4 COMPILATION amp INSTALLATION 4 4 7 11 rhd_shortrad_operator_102 rhd short characteristics radiation operator loop 02 in rhd_shortrad_module F90 Category performance enhancement Select the way the short characteristics operator is accessed Values e 0 old default The routine with the short characteristics operator is called within a loop and should be inlined e 1 default The program fragment with the short characteristics operator is included No inlining necessary 4 4 7 12 rhd shortrad dtauop 101
254. red at the boundary This boundary condition is unphysi cal because the magnetic field is an axial vector and because it violates the divergence free property of the magnetic field Therefore this boundary condition should be used with caution The fixed conditions are realized by setting the electric field at those cell edges that coincide with the physical boundary zero This is done in the constrained transport module 7 1 5 2 character top_bound_mag The boundary condition at the top of the model is given by for instance character top_bound_mag f A80 b 80 n bottom boundary conditions magnetic vertical Possible values are e constant constant extrapolation of all magnetic field components into the ghost cells e periodic periodic continuation of all magnetic field components into the ghost cells e fixed the component normal to the boundary is kept fixed at its inital value Constant extrapo lation applies for the transversal components e vertical constant extrapolation for the vertical component The transversal cell centered field is mirrored with the opposite sign That should result in transversal components of the boundary centered field being zero at the boundary e vertical2 constant extrapolation for the vertical component The transversal cell centered field is set to zero e oblique magnetic fields with a given inclination at the boundary The inclination is specified through parameters C_magthetaB and C_magph
255. reens function Some cool cell just above the sharp sub photospheric tem perature drop are not heated but cool further down Negative temperature spikes may result This smoothing should not be used anymore 7 1 23 7 character radpressure In the LHDrad module there exists a simple prescription for the radiative pressure reasonable in the optically thin which can be activated with character radpressure f A80 b 80 n Radiation pressure mode amp c0 on off on Allowed values are e on Radiation pressure on e off Radiation pressure off The scheme is pretty slow and wrong in the optically thick Do not use However the SHORTrad version is much more advance and can be used even if it might require some more testing 7 1 23 8 real c_radtintminfac In the LHDrad module The fraction the interpolated temperature at a point on the ray may exceed the minimum temperature at its four neighbors on the HD grid can be set e g with real c_radtintminfac f E15 8 b 4 amp n Temperature interpolation parameter u 1 amp c0 lt 1 0 only bilinear 1 1 reasonable weighting between min und bil 0 0 The introduction of this parameter was an attempt to reduce the negative cooling effect of a single hot cell on its cool neighbors It should be switched off e g by setting it to 0 0 7 1 23 9 integer dtimestep_out_fine This parameter can be specified but there is no corresponding output file in CO5BOLD yet integer
256. ric shocks are very badly resolved To cover them properly a sampling rate of 10 sec or below is needed On the other hand if no good time resolution is needed a sampling rate of a few minutes might be sufficient 7 1 21 2 real dtime out end The interval between outputs into the end file can be set e g with real dtime_out_end f E15 8 b 4 n Output time step u s amp c0 dtime_out_end lt 0 0 gt output only at very end amp ci dtime_out_end O gt output every time step amp 0 Ds c2 dtime_out_end gt 0 0 gt output every dtime_out_end seconds and at end 1 0E 04 Allowed values are e lt 0 0 Output only at very end of run classical behavior e 0 0 Output at every time step Attention This can produce lots of I O operations and can take a long time However it will not produce a large file Instead the end file is written over and over again e gt 0 0 Output to end file approximately every dtime_out_end seconds and at the very end of the simulation The standard value is 1 0 not enabling any additional output into this file A value a reasonable factor smaller than real dtime_out_full seems appropriate 7 1 PARAMETER FILE RHD PAR 157 7 1 21 3 real dtime out mean The interval between datasets in the mean file can be set e g with real dtime_out_mean f E15 8 b 4 n Output time step u s amp c0 dtime_out_mean lt 0 0 gt no output 0 5E 06 Allowed values are
257. routine from it was put into timing_module F90 2010 05 06 Compiler switch timing_r_type explained 4 4 1 3 Input output UIO compiler switches explained 4 4 2 accompanied by some changes concerning the files uio_mac _module fF 90 191 2010 06 14 Output of additional chunks described in 7 1 21 5 and 71 21 14 New versions of bottom boundary conditions better suited for HLLMHD solver The HLLMHD solver can do different time integration schemes In the HLLMHD step the CheckFlux step can be des activated MHD module allows unsplit update 2011 02 10 New parameters for MHD module 7 1 10 2 2011 03 28 New option vertical for magnetic boundary conditions 7 1 5 1 2011 07 04 MHD equations New parameters r0_core centrifugaal force 7 1 3 8 Heating modes for core heating 7 1 4 4 2011 12 09 New parameter r2_grav 7 1 3 7 New option for old parameter c_radhtautop 7 1 4 19 2012 01 10 A few new references including links Removal of old uio_mac_modules mention of rhd_rec_module f90 New reconstruction methods PPmimo FRmimo FRmono FRweno FRcont 7 1 8 4 New parameters r2_grav r0_core ar_RotationAxis centrifugal_force hdTransVeloMode 2012 01 11 Parameter real C_visDrag is obsolete Compiler switches rhd_roe1d_slope_101 IDF rhd_hyd_roeid_101 are obsolete 4 4 8 3 Updates for c_slopered 7 1 9 7 New options for parameters hdsplit CTU for HD Roe solver hdtimeintegrationscheme Sing
258. rt from first 9999 end with last 0 9999 09999 20 20 The index ranges go from 1 to the number of elements in that dimension Specifying a lower first or a larger last dimension as in the example means that all elements will be taken The output sampling rate is the same a for mean files Attention a high sampling frequency of large chunks can produce large files very quickly 7 1 21 6 integer outdim_chu2 The dimension of another output chunk 2 written into a separate file can be specified with this parameter analogously to integer outdim_chul as e g in integer outdim_chu2 d 1 2 1 3 f I5 b 4 p 6 n Chunk 2 dimension u 1 c0O 0 start from first 9999 end with last 0 9999 100 100 0 9999 7 1 21 7 integer outdim_chu3 The dimension of another output chunk 2 written into a separate file can be specified with this parameter analogously to integer outdim_chul as e g in integer outdim_chu3 d 1 2 1 3 f I5 b 4 p 6 n Chunk 3 dimension u 1 c0 0 start from first 9999 end with last 100 100 0 9999 O 9999 158 CHAPTER 7 INPUT AND CONTROL FILES 7 1 21 8 character infile start The filename of the initial model is specified e g with character infile start f A80 b 80 n File name of start model rhd sta Default is rhd sta for a parameter file used within a batch system Typical filenames are st35gm04n01_01 sta or gt57g44n20dz end 7 1 21 9 integer istep in start The index number of th
259. rval is given by time_scaleend see Sect 7 1 22 2 The first set of parameters is given by the usual rhd par file while the second set is given by an additional rhd par2 file see Tab 6 1 Normally the scal ing is inactive To activate it the rhd_scale_module has to be compiled by activating any tweak module i e e g by setting F9O_TWEAK 1 see Sect 4 3 1 15 before calling the configure script see Sect 4 3 The file rhd par2 has to exist in the current directory i e at the same place where the rhd par file resides and it has to have some entries with values differing from those in rhd par Note though that so far only a few parameters are treated by the rhd_scale_module In addition 0 0 lt time_ScaleStart lt time and time_ScaleStart lt time_ScaleEnd have to be fulfilled Choosing 0 0 lt time_ScaleStart time_ScaleEnd should work but results in an abrupt change of parameters not recommended For later runs starting with time_ScaleEnd lt time the file rhd par should be replaced by the pre vious rhd par2 and both scaling time parameters should be set to negative values to properly indicate that the scaling is now finished otherwise the data in rhd par don t represent the values actually used for the simulation The start time of the scaling interval can be set e g by 7 1 PARAMETER FILE RHD PAR 161 real time _scalestart f E15 8 b 4 n Start time of scaling interval u s 100 0 Allowed values are e lt 0 0 Don t
260. s case we obtain much simpler relations 1 e CyT BE 86 Pyt p I h T 87 s Cy ln p yln p const 88 y p r T2 T const 89 Cy o ER 90 1 Cy corm Cu 91 Y Cp Ro S Cp 92 xTr Xxp 0 1 93 7 3 ns Ke E Y OR r 2 F 95 Chapter 3 CO5BOLD file overview In this section all the files and modules CO5BOLD contains are listed 3 1 Fortran directories The files necessary to compile CO5BOLD are distributed over a few directories in the main directory for The source files are located as shown in Tab Paths Abb Description for cons f90 CON constants and units for eos f90 EOS equation of state for hd chem CHEM chemical reaction network for hd dust DUST source terms due to dust or molecules for hd hion 90 HION time dependent hydrogen ionization for hd mhd MHD MHD for hd rhd RHD RHD main HD Bernd s radiation transport for hd rhdb RHDB basic RHD I O box handling averaging for hd tweak TWEAK various optional tweak modules for hd unitt UT unit test subroutines and main program for mat str STR string handling for opa opta OPTA opacities for rad hdrad RAD Matthias radiation transport for time f90 TIME timing for uio f90 UIO I O Table 3 1 List of source directories with path name abbreviation and a short description The executables and Makefiles object files module information files are usually located in subdi rectories of t
261. s from uio_deform e 2 Set word lengths explicitly 4 4 2 4 uio switch ieeele 101 uio switch ieee little endian list 01 in uio_mac_module F90 Category I O account for property of machine Values e 0 Don t include this conversion type default e 1 Get information about word lengths from uio_deform e 2 Set word lengths explicitly 4 4 2 5 ulo_ switch_ieee_101 uio switch ieee list 01 in uio_mac_module F90 Category I O account for property of machine This is a fallback for reading of UIO files that should be activated for compilation if either of the Endian formats above is allowed It should not be used for writing Values e 0 Don t include this conversion type default e 1 Get information about word lengths from uio_deform e 2 Set word lengths explicitly 4 byte words e 3 Set word lengths explicitly 8 byte words 4 4 2 6 uio switch crayxmp 101 uio switch cray x mp list 01 in uio_mac_module F90 Category I O account for property of machine This is the native format on old Cray X MP and Cray TS machines Values e 0 Don t include this conversion type default e 1 Get information about word lengths from uio_deform 4 4 2 7 uio_switch_open_l01 uio switch open list 01 in uio_mac_module F90 Category I O account for property of machine Many compilers support a transparent conversion between number representations during reading and writing
262. sanne H fner 138 CHAPTER 7 INPUT AND CONTROL FILES e chemreacnet chemical reaction networks routines from Sven Wedemeyer B hm and Inga Kamp e hiontd time dependent hydrogen ionization routines from Jorrit Leenaarts and Sven Wedemeyer B hm 7 1 12 2 character dustreconstruction While usually i e when this parameter is not set the reconstruction scheme for the additional density fields is the same as for the normal hydrodynamics quantities see 7 1 8 4 it can make sense to choose a strictly monotonic scheme for these additional fields This scheme can be more e g PP or less e g PPmimo aggressive It can be chosen e g with character dustreconstruction f A80 b 80 n Reconstruction method for qucs amp cO Constant c1 Minmod VanLeer Superbee c2 PP PPmimo c3 FRmimo FRmono FRmono Useful combinations are e reconstruction vanLeer dustreconstruction Superbee e reconstruction FRweno dustreconstruction FRmono e reconstruction FRweno dustreconstruction PP e reconstruction HBweno dustreconstruction PP e reconstruction HBweno dustreconstruction PPmimo 7 1 12 3 real c_dustOX There are ten parameters real c_dust01 to c_dust10 to control each dust formation scheme in detail A parameter can be given as in real c_dust01 f E15 8 b 4 n Dust parameter 1 0 0 The meaning and unit can vary from scheme to scheme The default value is 0 0 in each case Important The parameter real c_dust01
263. scale default e gt 0 0 Perform the scaling if all the other conditions are met 7 1 22 2 real time_scaleend Together with time_scalestart see a detailed description in Sect 7 1 22 1 this parameter specifies the scaling interval The end time of the scaling interval can be set e g by real time_scaleend f E15 8 b 4 n End time of scaling interval u s 200 0 Allowed values are e lt 0 0 Don t scale default e gt 0 0 Perform the scaling if all the other conditions are met With the given example values time_ScaleStart 100 0 and time_ScaleEnd 200 0 values from rhd par would be used for 100 0 lt time values from rhd par2 would be used for time gt 200 0 and values in between according to the interpolation in rhd_scale_module for 100 0 lt time lt 200 0 7 1 22 3 integer n testl The integer parameters n_test1 to n_test5 are general purpose parameters to facilitate the testing of new features They can be used anywhere in the code but only for a limited time In any release version of the code all references to these parameters should be replaced by proper parameters with a dedicated purpose and a descriptive name In contrast to these recommendation the parameters are used more or less permanently in the various tweak modules The parameter can be set e g by integer n_testi f 111 b 4 n ist integer test parameter 1 9 7 1 22 4 real c_test1 The real parameters c_test1 to c_test5 are general purpose
264. several compilers However there are Intel specific ones In some cases it was helpful to set export LD_ASSUME_KERNEL 2 4 19 when encountering problems with OpenMP However that seems not to be necessary with recent compiler versions Still often the stack memory per thread is too small which can be increased e g with export KMP_STACKSIZE 300000000 or export OMP_STACKSIZE 300M To optimize the performance particularly on many core systems the thread affinity see Intel Thread Affinity Interface can specified at runtime i e after compilation but before running the code e g with export KMP_AFFINITY verbose granularity core compact 4 6 9 Linux PathScale compiler Some experiments with the PathScale compiler have been made It is called with pathf90 The result is not entirely satisfying yet Important switches are e byteswapio With this flag set binary files in big_endian format the standard for UIO files are automatically transformed to little_endian and vice versa e 03 General optimization flag More aggressive optimization can be activated with Ofast or Ofast ipa e mp Parallelization OpenMP directives are activated 4 6 SPECIFIC MACHINES amp COMPILERS 65 4 6 10 Linux GNU g95 compiler One of the available GNU Fortran compilers is the g95 compiler with the g95 home page It is called with g95 Important switches are e fendian big With this flag set binary files in big_endian
265. should be used as a standard Attention The IDL type long corresponds to the standard Fortran type integer The IDL types byte and integer are not known in standard Fortran and are therefore transformed to the IDL type long before writing in the IDL routine uio_wr Be aware of The parsing and interpretation of the entry headers can only be done by scalar operations which are comparatively slow in IDL 6 2 7 2 Reading data with uio_data pro The IDL routine uio_data and the IDL function uio_d were the first set of high level routines to read UIO data in IDL They were useful for the easy reading of not too complex data files By now they are replaced by the routines uio_struct_rd and uio_dataset_rd see see next Section and Sect 10 The old routines allow the opening uio_data mode open filename model dat uio_data mode open filename model txt uio_data mode open filename model dat family mod1 uio_data mode open filename model txt family mod2 examination uio_data mode content uio_data mode files reading uio_data mode read value rho rho uio_data value temp temp uio_data value p p filename model dat uio_data value p p family mod1 plot_oi uio_d p uio_d t and closing uio_data mode close filename model dat uio_data mode cl
266. sical one is controlled by c_visSmagorinsky c_visArfificial etc Its use was recommeded for the old version of the Roe solver Nowadays it is only kept for compatability reasons The new point to point tensor viscosity is controlled by c_visP2Pcoeff etc see Sect 7 1 11 10 below It has better stability properties than the old version However due to the improved stability of the Roe solver itself the use of this new tensor viscosity formulation is actually less often necessary than the old one 7 1 11 1 integer n_visiter While this parameter is named analogously to n_hyditer it controls a somewhat different behavior of the viscosity step While positive values of n_visiter have no meaning so far a negative value specifies the number of hydrodynamics substeps per viscosity step or rather how often the viscosity step is called during the hydrodynamics iteration The parameter can be set e g with integer n_visiter f 14 b 4 n Number of tensor viscosity iterations amp c0 lt 0 Number of hydro substeps per viscosity substep amp ci 0 One tensor viscosity substep per global time step old default amp c2 gt 0 Not implemented yet 1 Possible values are e 0 Do exactly one viscosity step per global time step independent of the number of hydrodynamics sub steps This is the classical behavior and default e 1 Do one viscosity step per hydrodynamics sub step and vice versa e lt 0 Do n
267. sinter eosinter Perform entire single 2D or 3D hydrodynamics step employ Roe scheme Perform entire 3D hydro step possibly composed of multiple time steps rhd_hyd_CoriolisOMP rhd_bound_3DTransmit eosinter rhd_bound_3DInOutFlow eosinter_all rhd_ hyd _RoeiDMincedStep x rhd_hyd_Roe1DStep re rhd_hyd_RoeiDStep rhd_bound_1DGhost rhd_grav rhd_bound_1DTransmit eosinter_PdPTdT rhd_bound_1DGhost eosinter_all eosinter_PdPTdT eosinter_PdP rhd_hyd_RoeStateiDflux rhd_hyd_RecVecEq rhd_hyd_RecVec rhd_hyd_RoeWave1Dflux rhd_hyd_Pred rhd_hyd_RoeWavealpha12 rhd_hyd_Fluxalpha rhd_hyd_FluxalphaEq rhd_hyd_RoeWavealpha36 rhd_hyd_Fluxalpha rhd_hyd_FluxalphaEq rhd_hyd_FluxState rhd_hyd_RecVecEq rhd_hyd_RecVec rhd_hyd_sDiff rhd_hyd_RecVecEq 5 4 COMMENTS 77 rhd_hyd_RecVec rhd_hyd_RoeWavealpha45 rhd_hyd_FluxState rhd_hyd_RecVecEq rhd_hyd_RecVec rhd_hyd_Fluxrhoei rhd_hyd_RoeiDoutput rhd_mean_weight rhd_mean_x23mean rhd_mean_x23weight rhd_mean_rindex rhd_mean_rcmean rhd_mean_VecProj rhd_mean_rbmean rhd_hyd_Dust rhd_hyd_FluxState rhd_hyd_RecVecEq rhd_hyd_RecVec rhd_hyd_Rossow78tfall rhd_hyd_RecVecEq rhd_hyd_RecVec rhd_mean_weight rhd_mean_x23mean rhd_hyd_mhd rhd_hyd_Fluxalpha e tee KT EE oar MODIFICATION HISTORY 1997 06 19 B F Kiel First version 1999 05 11 B F Copenhag
268. sky ooa 135 7 1 11 12 real c visp2phypartificial o oaa o 136 7 1 11 13 real c visp2 phypexpansion e 136 7 1 11 14 real e visp2pdivrhov ee ee 136 7 1 11 15 real ec visp2pinclil o e 136 7 1 11 16 real c_visp2pincl2 o e 136 7 1 11 17 integer n_viscellsperchunk 20 20 2020 00 137 7 1 12 Dust molecules hydrogen ionization General 0 o 137 7 1 12 1 character dustscheme o a E a a a ee eens 137 7 1 12 2 character dustreconstruction o 0200000004 138 11 12 35 real e dust0OX oo ne Rw ee Gee een ee a a G 138 11 124 character chem_reacfile eeen 138 7 1 12 5 character chem reacpath o e 138 7 1 12 6 real chem_abumetal eeen 138 7 1 12 7 character hion_datapath o o e e 139 1 1 12 8 character hion atomfilel sa o o e e e 139 1 1 12 9 character hion abufilel o o e e 139 7 1 12 10 character hion edensfilel o e e ee 139 7 1 12 11 character hion_pflile ee 139 711212 real dtime out hi0 e 139 7 1 12 13 integer hion_chunks o 2000000 eee eee 139 7 1 13 Dust dustscheme dust_moment04_C2 139 7 1 13 1 real c_dust0ll 2 a a a 140 CONTENTS 9 7 1 13 2 real c_dust02Q eee 140 7 1 13 3 real edust ss an bk aoe Ea Ge ee Ee Ge Berd a ws E 140 7
269. slope_101 rhd_roeid_step_t01 47 rhd_shortrad_diri_101 rhd_shortrad_dir_102 51 rhd_shortrad_dtauop_101 rhd_shortrad_dtauop_102 rhd_shortrad_formal1_101 rhd_shortrad_formal_t01 rhd_shortrad_operator_101 49 rhd_shortrad_operator_102 rhd_shortrad_step_t01 rhd_vis_density_p01 47 rhd_vis_t01 47 timing_c_factor timing_c_range 41 timing_r_type uio_switch_crayxmp_101 44 uio_switch_ieeebe_101 44 200 uio_switch_ieee_101 44 uio_switch_ieeele_101 44 uio_switch_native_101 43 uio_switch_open_101 44 uio_switch_system_101 configure script 37140 control variables F90_BASEPATH 37 40 F90_CHEM 39 F90_COLOR F90_COMPILER F90_DEBUG 38 F90_DUST F90_HION F90_LHDRAD 39 F90_MACHINE 10 F90_MHD 40 F90_MSRAD 39 F90_OPTIMIZE F90_PARALLEL F90_POSTFLAGS 38 F90_PREFLAGS F90_SHORTRAD F90_TWEAK 40 F90_UNIT configurerc file Coriolis force 105 craSHi Cray 56 150 151 195 CTU data format UIO directional splitting double precision dust entropy fix environment variable EOS equation of state files 5 LOT 167 configure script resource file configurerc data files table of documentation documentation files table of Fortran Fortran files table of HION IDL UIO input INDEX chem dat EOS opacities 115 rhd cont 166 rhd dump 166 rhd par rhd sta rhd stop 166 LaTeX CO5BO
270. ssume byterecl Necessary for the UIO routines specify that the length of a record is measured in bytes and not in words e cpp invoke the preprocessor on all source files e inline speed V Force automatic inlining optimized for speed e 04 General optimization e Drhd_hyd_roe1d_101 0 Optimization Choose standard set of routines for Roe solver See Sect 4 4 8 2 e DMSrad_raytas 0 Optimization choose default version of loop in SUBROUTINE raytas in file MSrad3D F90 See Sect 4 4 7 20 4 6 3 Hewlett Packard V2500 The 12 processor machine zeipel from Hewlett Packard was a V2500 PA 2 0 system There was some success to force the compiler to accept the OpenMP directives in CO5BOLD Yet when running on several processors only some routines e g rhd_shortrad_dirsimple1 in CO5BOLD could benefit while others rhd_shortrad_dirsimple2 rhd_shortrad_dirsimple3 were significantly slower than on one processor In addition the single processor performance was not very good partly because the achievable optimization level is not very high Some macros which seemed to be necessary e U77 Link proper library to make the machine understand e g call flush 6 4 6 SPECIFIC MACHINES amp COMPILERS 57 cpp yes Switch on the C preprocessor Note that all Fortran90 files have to end with f90 The F90 suffix does not seem to work Oparallel Oopenmp Onoautopar Try to enable parallelization with Ope
271. st xvector yes no General optimization On the Sun the fast option switches on more or less all optimization features of the compiler That works reasonable well However during the compilation of gasinter_routines f90 and only there the switch xvector no is required This is done automatically in the Makefile e inline Optimization routines that should be inlined see Sect 4 5 4 e DMSrad_raytas 2 Optimization choose non default version of loop in SUBROUTINE raytas in file MSrad3D F90 See Sect 4 4 7 20 e Drhd_shortrad_formal_101 1 Optimization split loop for exp dtau computation into two loops See Sect 4 4 7 14 e Drhd_shortrad_dir1_101 1 Optimization Transpose arrays and use routine rhd_shortrad_dir3 for rays in xl direction See Sect 4 4 7 15 e Drhd_hyd_entropyfix_p01 1 Optimization version with masks weights See Sect 4 4 5 2 e xarch native64 Produces 64 bit code optimized for local machine 70 CHAPTER 4 COMPILATION amp INSTALLATION Chapter 5 Programmers guide 5 1 General code organization The directory structure is shown in Tab In the master directory for for Fortran there are a number of sub directories for groups of files Most of the files are located somewhere below for hd Exceptions are files with modules that might be used outside CO5OLD like the UIO EOS or OPTA routines A master group as e g for hd or for uio can have a number of sub group directories as e
272. step can be used to restrict the time step by specifying real c_maxeichange f E15 8 b 4 n maximum hydro energy change u 1 amp cO range 0 1 1 0 typically 0 5 off 0 0 0 5 The default is 0 9 Nevertheless since the Roe solver is constructed to handle shocks and rapid changes in density and energy this check is usually not needed It can be switched off by setting c_maxeichange 0 0 7 1 20 9 real c_hydsoundcourant In addition to the normal Courant factor c_courant that gives a time step restriction based on c abs v1 another factor can be specified that is based only on the sound speed c e g with real c_hydsoundcourant f E15 8 b 4 n HD sound speed Courant factor u 1 amp cO range 0 0 lt c_hydsoundcourant lt 0 5 typically 0 45 0 48 The check for this condition should be activated by giving c_hydsoundcourant a positive value gt 0 for 3D simulations with hdsplit CTU see Sect 7 1 8 3Jand Table 7 1 In this case a value slightly smaller than 0 5 is a reasonable choice 7 1 20 10 real c_hydsoundcourantmax In addition to the normal maximum Courant factor c_courantmax that gives a time step restriction based on c abs v1 another factor can be specified that is based only on the sound speed c e g with real c_hydsoundcourantmax f E15 8 b 4 amp n maximum HD sound speed Courant factor u 1 amp cO range c_hydsoundcourant lt c_hydsoundcourantmax lt 0 5 typically 0 5 0 5 The
273. t amp cO formatted unformatted unformatted Allowed values are e unformatted default fast compact possibly machine dependent output strongly recommended e formatted slow machine independent output big files 7 1 21 22 character outconv_mean The conversion type see Sect 6 2 3 1 of the additional data files can be specified e g with character outconv_mean f A80 b 80 n Output file conversion amp c0 ieee_4 ieee_8 crayxmp_8 native ieee_4 The allowed values depend on the machine Leaving this field empty means that the default is chosen that is build into the local UIO module If the type ieee_4 is supported which is always the case so far it should be chosen 7 1 22 Scale and test parameters 7 1 22 1 real time_scalestart Usually parameters are read from rhd par and are kept constant during a run A consecutive run could be started with a different set though e g to increase the luminosity of a model However in many cases such an abrupt change causes the generation of spurious often plane parallel or radial waves And it takes time and effort by temporarilly increasing some viscosity to damp them This is particularly annoying when the transient waves reduce the time step of the simulations for some period The transition between two parameter sets can be smoothed by interpolating between them The onset of the transition interval is given by time_scalestart while the end of the inte
274. t file containing the chemical abundances character hion abufile f A80 b 80 n HION abundance file name abundance input 7 1 12 10 character hion edensfile The name of the HION input file containing the electron density table character hion edensfile f A80 b 80 n HION electron density file name edens dat 7 1 12 11 character hion_pffile The name of the HION input file containing the partition functions character hion_pffile f A80 b 80 n HION partition function file name pf_kurucz dat 7 1 12 12 real dtime_out_hion Time increment for additional HION output Positive values specify the time increment in seconds negative values the increment in computational time steps Setting the parameter to zero suppresses the output real dtime_out_hion f E15 8 b 4 n Output file time step HION 10 0 7 1 12 13 integer hion_chunks Number of chunks to use for HION in order to limit the required memory Do not make it bigger than the number of points in the x2 direction integer hion_chunks f 19 b 4 n Number of HION chunks 1 7 1 13 Dust dustscheme dust_moment04_c2 In this section the parameters for dustscheme dust_moment04_c2 4 bin 4 moments dust scheme for carbon rich dust are described 140 CHAPTER 7 INPUT AND CONTROL FILES 7 1 13 1 real c_dust01 The carbon to oxygen ratio is specified with e g real c_dust01 f E15 8 b 4 n C to O ratio u 1 1 4 Larger values mean more dust Values belo
275. t maximum five modules play a role The uio_bulk_ module contains the main part of the UIO routines and also uses the relevant sub modules Instead of uio_bulk_module the module uio_table module is used if the UIO table routines are needed The modules uio_siz_module and uio_nam_module contain specifications about the size of some arrays and the length of strings and the names of types and keywords respectively The module uio_filedef_module contains some definitions in addition to the basic UIO standard as e g the label names which delimit a data set label dataset and label enddataset A typical case for the use of UIO modules is use uio_bulk_module use uio_siz_module use uio_nam_module 6 2 5 3 Compiling and Makefiles For a certain platform it was necessary to change the name of the module file with the machine dependent routines uio_mac _module f90 in a Makefile for the UIO routines For this purpose the environment variable UIOMAC had to be set to the name of the appropriate routine see Sect 3 1 In the current version of COSBOLD there is only one file uio_mac_module F90 with a capital F90 that can be changed during the compilation by preprocessor switches see 4 4 2 For CO5BOLD or the UIO Unix scripts the respective configure script takes care of either of these steps Many compilers generate module information files with suffixes like M mod or kmo To clean up information files with other suffixes they have to be
276. t only on the fraction of the jump that is still there after the reconstruction unlike C_hydTdiffLin and C_hydTdiffMach that act on local temperature minima see below This parameter is not recognized by the MHD module 7 1 9 18 real c_hydvdiffvelo With this parameter an extra diffusion of the transversal velocities after reconstructing them can be activated For the diffusion velocity all three velocity components are used i e there is a diffusion even transversal to the flow speed This makes the diffusion more isotropic and lets numerical solutions to the Sedov blast wave problem look smoother The value can be set e g with real c_hydvdiffvelo f E15 8 b 4 amp n Parameter for transversal momentum diffusion down a velocity step u 1 amp cO typically 1 0 10 Possible choices are for example e 0 0 No extra energy diffusion down an entropy gradient default e 0 2 Small value e 0 5 Reasonable value e 1 0 Reasonable value e 3 0 Large value The type of dissipation that can be added with this option is similar to that provided by the tensor viscosity Sect 7 1 11 Therefore I recommend to use only small values 0 5 to 1 0 to reduce the directional dependence of the dissipation applied by the Roe solver and to use an explicite tensor viscosity Sect 7 1 11 in case of emergencies This parameter is not recognized by the MHD module but in fact the HLLE solver applies a somewhat similar but stronger diss
277. t to 9 the default but e g to 15 If it works overflows are essentially ruled out If it does not work the compilation stops with an error message Values e 9 default use standard 4 byte integers for timing counters e 15 or otherwise use this number for the range of Fortran integers By a proper choice of this number all the timing measurements can be made meaningful even for long runs on machines with fast counters 42 CHAPTER 4 COMPILATION amp INSTALLATION 4 4 1 3 timing r type timing rate type in timing_module F90 Category account for property of machine During a CO5BOLD run the total execution time is measured and printed after each time step The type of clock used can be chosen with e 1 Use call system_clock default e 2 Use call Date_and_Time e 3 Use t etime Sun version used in most cases e 4 Use call etime gfortran version e 5 Use call tremain Cray version e 6 Use call clock Hitachi version 4 4 1 4 rhd box arrays01 rhd box arrays 01 in rhd_box_module F90 Category performance enhancement Switch to choose between the classical use of pointer arrays within the box structure to store arrays or the new version with allocatable arrays that is potentially faster Values e 0 classical pointer arrays default e 1 new allocatable arrays probably faster 4 4 1 5 rhd_box_gravOl rhd box gravitation 01 in rhd_box_modu
278. tandard file descriptors and labels uio_table_module f90 Table manipulation routines uio_var_module f90 Definition and handling of UIO flexible variable uio_varfile_module f90 Definition and handling of file structure of UIO flexible variables uiocop f90 Program to copy and transform UIO files uiolok f90 Program to look into UIO files uioinf f90 Program to give information about conversion types uiotst f90 Program to produce test UIO file Table 6 5 UIO Fortran90 files Module Contents uio_cst_module Channel status information uio_cvl_module Convert type list of current machine uio_inf_module Information about environment uio_nam_module Definition of names uio_siz_module String length table size uio_base_module Basic set of UIO routines string processing header handling I O channel management Table 6 6 Contents of uio_base_module f90 6 2 5 Fortran90 6 2 5 1 Files The Fortran UIO package is a collection of Fortran90 modules and programs described in Table 6 5 The file uio_base_module f90 contains the basic set of modules see Table 6 6 In older version of CO5BOLD the files uio_mac _module f90 Tab contained machine dependent routines collected in the module uio mac module see Tab 6 7 Routine Purpose uio_getenv Get information about environment uio_mkcvls Make list with possible conversion types uio_uopen Open file with special handling for conversion type uio_uclose Close file wit
279. tation For scalar code x1 90 might be sufficient Important switches are e qsuffix f f90 qsuffix cpp F90 To tell the compiler about the existence of Fortran90 and to enable the preprocessing for files with suffix F90 e gextname flush etime Append underscore to both routine names In the preprocessor switches are listed that control the modern single version uio_mac_module F90 e WF Drhd_r03 The compiler does not send switches starting with D to the preprocessor but tries to interpret them itself unlike all other compilers Therefore each switch e g Drhd_r03 has to escaped with WF as e g WF Drhd_r03 e q64 Activate the 64 bit mode In the default 32 bit mode a very small model with total memory requirements far below the 2 GByte limit might run However experienced IBM users might experiment instead with the compiler switches bmaxstack bmaxdata and qsmallstack with the UNIX commands limit or ulimit or with the settings in the header of the batch script e 03 Choose optimization level Higher levels that involve interprocedural analysis cause the com piler to stop with an error message e qarch auto qtune auto qcache auto To allow optimization specific for the local ma chine default in the configure script Cross compilation can be activated e g with qarch pwr3 qtune pwr3 or qarch pwr4 qtune pwr4 by setting an environment variable e g F90_MACHINE pwr3 bef
280. te flux of transversal momentum with consistent advection version 2 Use mass flux and Roe mean density 6 to determine flow speed Actually recompute transversal velocities e CA3 Compute flux of transversal momentum with consistent advection version 3 Use mass flux and upwind density to determine flow speed Compute transversal momentum fluxes from mass flux and diffusive momentum flux e CA4 Compute flux of transversal momentum with consistent advection version 4 Use mass flux and Roe mean density J to determine flow speed Compute transversal momentum fluxes from mass flux and diffusive momentum flux recommended For instance for a 2D Sedov blast wave problem the new modes give less artifacts close to the axes than the old mode Normal The four new advection types are made of to choices for the way to compute the effective flow speed across a cell boundary different density values can be used and two ways to compose the final transversal momentum fluxes Version CA4 is recommeded This parameter is not recognized by the MHD module 7 1 9 14 character hdentropywavemode This parameter controls the computation of the Roe correction flux for the entropy wave It can be set e g with character hdentropywavemode f A80 b 80 amp n Mode for entropy wave type amp c0 Normal Entropy1 Entropy2 Entropy3M Entropy3Ms Entropy3gMps recommended Entropy3gMps The choices are e Normal Compute entropy wave flux w
281. te that all Fortran90 files have to end with f90 The F90 suffix does not seem to work Ofast High optimization level And Ofaster is even higher Dopenmp Onoautopar Try to enable parallelization with OpenMP directives disable auto parallelization The code compiles and runs fast but crashes after a few time steps A proposed compiling sequence is LHDrad DUST MHD do not compile export F90_MSRAD 1 export F90_SHORTRAD 1 configure make 58 CHAPTER 4 COMPILATION amp INSTALLATION 4 6 5 Hitachi SR8000 Some information about the Hitachi compiler is here In the preprocessor switches are listed that control the modern single version uio_mac_module F90 conti199 Up to 199 continuation lines can be interpreted otherwise not more than 39 continu ation lines are accepted limit Limits the amount of time and memory for compilation opt ss use highest possible optimization level nopredicate this option switches off a sub option activated by opt ss It is necessary to disable the predicate option because the code crashes otherwise segmentation violation The switch must appear after setting opt ss pvfunc 2 References the pseudo vectorizing mathematical function and applies the temporary array to reference the pseudo vectorizing mathematical function omp parallel 1 parallelize based on OpenMP directives only procnum 8 generate code for 8 processors on one node orphane
282. ted the slope can be reduced by averaging with the results from a MinMod reconstruction by setting c_slopered see Sect 7 1 9 7 to a positive non zero value This can improve the stability without significantly reducing the effective numerical resolution Switch values e 0 default no slope reduction e 1 slope reduction in case of expansion wave e 2 slope reduction in case of strong density contrast This switch is not recognized anymore 4 5 Optimization compiler switches In this section some mandatory or useful compiler flags are described These have different functions e Enable necessary macro processing expansion for the F90 files e Force proper handling of binary I O e Choose module for radiative transfer e Activate module for dust formation and or magnetic field transport e Enable parallelization with OpenMP directives 4 5 OPTIMIZATION COMPILER SWITCHES 53 e Choose a version of a subroutine or loop which is optimized for a specific architecture e Tell the compiler if and what to inline e Improve the general performance 4 5 1 OpenMP settings The OpenMP specifications and many related links can be found on the OpenMP org homepage Overviews can be found in Shared Memory Programming With OpenMP M D Jones 2013 and Intel Parallel Studio XE Facing the Multicore Challenge II Hans Pabst 2011 A complete online tutorial is Parallel Computing and OpenMP Tutorial Shao Ching Huang 2013
283. ted into the computational domain has a unique component which is in the x1 direction and it is only present where a velocity in the positive x3 direction exists In all other places the magnetic field components are constantly extrapolated into the ghost cells 7 1 5 4 real bl inflow This parameter controls the strength of the inflowing horizontal magnetic field at the lower boundary in connection with bottom_bound_mag inoutflow The default value is 0 0 Example real bi_inflow f E15 8 b 4 amp n Strength of inflowing horizontal magnetic field u G 10 0 The unit of this parameter is gauss no factor y4m 7 1 5 5 real c_magthetab This parameter specifies the angle between the magnetic field vector and the x3 axis in radians in the case of oblique boundary conditions The default value is 0 0 Example real c_magthetab f E15 8 b 4 amp n angle magnetic field w r to the vertical direction amp u rad cO used in combination with oblique conditions 0 523598775598299 7 1 5 6 real c magphib This parameter specifies the angle between the horizontal component of the magnetic field vector and the xl axis in radians in the case of oblique boundary conditions The default value is 0 0 Example real c_magphib f E15 8 b 4 n angle magnetic field w r to the x axis amp u rad cO used in combination with oblique conditions 0 0 7 1 6 Equation of state 7 1 6 1 character eosfile The equation of state file
284. terpolation opa opta opta_par_module f90 OPTA parameters for opacity routines opa opta opta_routines F90 OPTA opacity reading amp interpolation opa opta opta_dust f 90 OPTA dust opacity hd dust rhd_dust_module F90 DUST dust molecule formation master hd dust dust_k3mon_module f DUST 1 or 2 component dust model hd dust dust_bins_module 90 DUST multi bin dust model hd dust dust_momentc2_module f DUST 4 moment C dust model hd dust C2 INC DUST dust include file C molecule hd dust C2H INC DUST dust include file CoH molecule hd dust C2H2 INC DUST dust include file C H molecule hd dust CHPAR_CT INC DUST dust include file hd dust DINDEX INC DUST dust include file hd dust DKSPLINT INC DUST dust include file hd dust H2 INC DUST dust include file H molecule hd chem chem_rn_module F90 CHEM chemical reaction network hd chem chem_rn_dvode F90 CHEM chemical reaction network solver hd hion f90 hion_main_module f90 HION hydrogen ionization hd hion f90 hion_io_module f90 HION hydrogen ionization I O hd hion f90 hion_def_module f90 HION hydrogen ionization definitions hd hion f90 hion_dvode_module f90 HION hydrogen ionization solver hd hion f90 hion_lineq_module f90 HION hydrogen ionization linear algebra hd hion f90 hion_util_module f90 HION hydrogen ionization utility package hd hion f90 hion_devel_module f90 HION hydrogen ionization developer kit hd hion f90 edens_module f90 HION electron densities Table 3 2 List of
285. the right Tabs should not be used Special care should be taken for the indentation and alignment of stencil operations of assignments and equations see below To have sufficient screen estate left for these the recommended indentation amount per level 2 spaces is rather small For the same reason module and subroutine headers should not be indented even if logically a contained subroutine is a level below the corresponding module 5 2 2 Alignment of assignments and equations Indentation and alignment of stencil operations are important as in Save original values into local copies rho model rho 71 72 ei model ei vi model v1 or eip_ll ei i1 2 i12 i3 eip_l ei i1 1 i12 i3 eip_r ei it i2 13 eip_rr ei i1 1 i2 i3 or Fill buffer T mi 1 m2 n2 T nit i m2 n2 T mi 1 n1 1 m2 1 T mi 1 n1 1 n2 1 T mi 1 n1 1 m2 1 n2 1 T mi 1 n1 1 m2 1 n2 1 zones In this case blanks around the CHAPTER 5 PROGRAMMER S GUIDE P i1 2 12 13 rho i1 2 i12 i3 P i1 1 12 13 rho i1 1 i12 i3 P 1 i2 13 rholil i2 i3 P i1 1 i2 13 rho i1t1 i2 i3 of temperature array m3 n3 T mi m2 n2 m3 m3 n3 T ni m2 n2 m3 m3 n3 T mi 1 n1 1 m2 m3 m3 n3 T mi 1 n1 1 n2 m3 m3 1 T m1i 1 n1 1 m2 1 n2 1 m3 n3 1 T mi 1 n1 1 m2 1 n2 1 149 R n3 n3 n3 n3 n3 ed sign might be appropriate Other examples are lambda_til_mi il i2 13 1 0 mas
286. the COmputation of COmpressible COnvection in a BOx of L Dimensions with 1 2 3 e EOS Equation Of State e HION Hydrogen IONization e MPI Message Passing Interface e MHD Magneto HydroDynamics e OpenMP Open Multi Processing e OpenMPI Open Message Passing Interface e RHD Radiation HydroDynamics e UIO the Universal Input Output format It is used in COSBOLD for parameter model mean and EOS files 193 194 CHAPTER 12 GLOSSARY Chapter 13 Trademarks e AMD is a trademark of Advanced Micro Devices Inc e Compaq is a US trademark of Compaq and or Hewlett Packard Company e Cray is a trademark of Cray Research e HP isa US trademark of Hewlett Packard Company e IBM is a US trademark of International Business Machines e IDL is a registered trademark of Research Systems Inc e Intel Itanium and Pentium are US trademarks of Intel Corporation e Linux is a trademark of Linus Torvalds e NEC is a registered trademark of Nippon Electric Company e PGI is a trademark of The Portland Group Compiler Technology e SGl is a trademark of Silicon Graphics e Solaris Sun SunOS and SunFire are US trademarks of Sun Microsystems Inc e Sparc is a US trademark of SPARC International Inc e UNIX is a registered trademark of The Open Group e All other product names mentioned in this manual are trademarks or registered trademarks of their respective owners 195 196 CH
287. the cell centers Therefore the format of the magnetic field arrays is slightly different from that of the other hydrodynamic variables Staggered grid representation of the magnetic field in 2 dimensions E l l gt gt gt gt gt o R gt gt l l l l E l l gt gt gt gt amp gt gt D gt l Fenner enten 79 4 9 4 5 7 4 l l gt gt gt gt Rx gt o R gt gt l l Feet 7 4 7 4 tenten tenten l l gt gt gt gt Rx gt o R gt gt l l E l l gt gt gt gt amp gt o R gt gt Fennen entente tenten 8 hydrodynamic variables gt x1 component of the magnetic field x2 component of the magnetic field 22 CHAPTER 2 EQUATIONS The extension to 3 dimensions should be clear Variables at the left or the bottom boundary have the same indices as the cell For a box with 120x120x120 cells the header for the magnetic field arrays in the start model may look like real bbi d 1 121 1 120 1 120 f E13 6 p 4 b 4 amp n cell boundary magnetic field 1 u G sqrt 4pi real bb2 d 1 120 1 121 1 120 f E13 6 p 4 b 4 amp n cell boundary magnetic field 2 u G sqrt 4pi real bb3 d 1 120 1 120 1 121 f E13 6 p 4 b 4 amp n cell boundary magnetic field 3 u G sqrt 4pi For simplicity the MHD module uses units such that the 4 pi fact
288. tistics printed at the end of a simulation run the standard Fortran routine SYSTEM_CLOCK is used The macro timing_c_factor specifies by how much the count rate of this routine is reduced when storing its count value This does not prevent all overflows but can make the output much more useful Values e 1 default count rate of SYSTEM_CLOCK is used directly e otherwise e g 1000 count rate of SYSTEM_CLOCK is reduced by this factor By a proper choice of this factor the timing measurements of individual routines can be made meaningful the reduction of the count rate prevents overflows due to the addition of several measurements An overflow during an individual measurement can not be prevented Therefore the count rate for the entire program still tends to produce overflows 4 4 1 2 timing _c range timing counter range in timing_module F90 Category account for property of machine To produce the timing statistics printed at the end of a simulation run the standard Fortran routine SYSTEM_CLOCK is used The macro timing_c_range specifies the number of digits the range used for the integers storing the counters The value appears in the code e g in integer kind selected_int_kind timing_c_range count_total Fortran standard is the use of 4 byte integers However that is often not sufficient and can lead to over flows Many compilers can use longer integers though That can be tried by setting the timing_c_range no
289. together with the opacity file implicitly determine the chemical composition The EOS file can be specified for instance with character eosfile f A80 b 80 n E0S file name amp cO eos_gamma140 eos eos_mm20_1 eos eos_mm00_13 eos eos_mm00_15 eos There exists an increasing number of files e g e eos_mm00_13 eos Standard EOS file for solar composition with extra large density range towards low densities There exist two other files for the same composition but smaller density range eos_mm00 eos eos_mm00_1 eos e eos_XXXX_14 eos Several EOS tables for various compositions e eos_mm00_15 eos EOS file for solar composition with temperature range extended to very low values by keeping y fixed below 500K The number of points for the density sampling has been reduced The number of points for the energy sampling has been increased e eos_mm20_l eos Standard EOS file for metal poor star M H 2 0 with extended range in internal energy and density towards lower values The older file eos_mm20 eos did not reach far enough 7 1 PARAMETER FILE RHD PAR 115 e eos_gamma140 eos EOS table for simple gas with constant 1 4 In this case all quantities could be faster computed than by interpolation in a table Nevertheless for compatibility reasons to be able to use the existing EOS Fortran routines the table is provided e eos_gamma166 eos EOS table for simple gas with constant 5 3 e cpheos_mm00 eos Copenhagen EOS for
290. tors in case of non equidistant grid 4 4 5 2 rhd hyd entropyfix_p0l rhd hydrodynamics entropy fix parameter 01 in rhd_hyd_module F90 Category performance enhancement The entropy fix can be done in one of two ways to get optimum performance with essentially the same results Values e 0 default if then else construction e 1 use a mask and the signum function 4 4 5 3 rhd_hyd_upwind_p01 rhd hydrodynamics upwind parameter 01 in rhd_hyd_module F90 Category performance enhancement The determination of the upwind direction can be done in one of two ways to get optimum performance with essentially the same results Values e 0 default if then else construction e 1 use a mask and the signum function 4 4 5 4 rhd roeld flux 101 rhd roe 1 dimension flux loop 01 in rhd_hyd_module F90 Category performance enhancement This switch allows to choose between various ways of computing the upwind centered Roe states Values e 0 Use upwind index arrays in all Roe state computations Do it in one step old default e 1 Use if then else constructs in all Roe state computations Do it in one step default recom mended e 2 Use upwind index arrays in all Roe state computations Do it in two steps e 3 Use if then else constructs in all Roe state computations Do it in two steps 4 4 5 5 rhd_bound_t01 rhd bound timing 01 in rhd_hyd_module F90 Category add
291. ts to compile CO5BOLD on neSH at the Rechenzentrum Kiel and on hwwsx5 at HLR Stuttgart An environment variable has to be set to FLRECLUNIT BYTE before execution of a program to enable UIO to compute proper record lengths The cross compiler on sunsrv or crossi is called with sxf90 Thus the environment variable F90_COMPILER sx90 has to be set before running the configure script No optimized version of CO5BOLD has been achieved yet Some maybe useful switches are e sx5 generate instructions for SX 5 Use sx6 or sx8 when appropriate e C vopt normal optimization in vector mode e Wf M noflunf M noinv M noinexact M setall suppress some exceptions e P openmp parallelization with OpenMP e Ep call cpp preprocessor e pi exp inlining of a list of routines see Sect 4 5 4 66 CHAPTER 4 COMPILATION amp INSTALLATION e dw float0 no special environment variable use internally and in files the 4 Byte big_endian format For the SX 5 the compiler flags in the configure script are FOOFLAGS C hopt sx5 dw float0 Wf L nostdout L fmtlist L inclist L mrgmsg L transform M noflunf M noinv M noinexact M setall pi exp rhd_shortrad operator exp rhd_shortrad_dtauop F9O0MODULES FOOTIME DMSrad_raytas 1 For the SX 8 the configure scripts gives the output sxf90 EP P openmp Chopt sx8 Wl Z 8G m dw float0 Wf L nostdout L fmtlist map summary transform L inclist L mrgmsg M noflunf
292. ty at the open boundary can be specified e g with real c_v3changesqrbottom f E15 8 b 4 amp n Quadratic velocity reduction rate at bottom u 1 0 002 This damping is stronger for velocities that exceed the rms value of the velocities averaged over the entire bottom layers 7 1 4 14 real c_visbound An additional drag force can be added locally in inflow cells in the outer layer when the transmitting boundary condition is chosen The value can be set e g with real c_visbound f E15 8 b 4 amp n Boundary drag viscosity parameter u 1 0 001 This extra drag force is usually not necessary and should be switched off with c_visbound 0 0 110 CHAPTER 7 INPUT AND CONTROL FILES 7 1 4 15 real c_rhochangetop The transmitting upper boundary condition can smooth density fluctuations with this parameter It is locally adjusted towards the global average to damp out possible instabilities It appears to be useful for the HLLMHD solver For simulations without magnetic fields there is no need to set this parameter so far The adjustment rate can be specified e g with real c_rhochangetop f E15 8 b 4 amp n Rate of density change for open upper boundary u 1 LO Obs So far this parameter only switches the density damping on or off All positive values have the same effect as a value of 1 0 7 1 4 16 real c_tchange In the case of a transmitting upper or outer boundary the temperature of the material streaming into the
293. ue of 1 0 is chosen e 0 0 lt C lt 1 0 The density scale height is enlarged to account for possible effects of turbulent pressure on the scale height The density decays less rapidly with height than in an isothermal hydrostatic stratification e C 1 0 Density scale height is pressure scale height e C gt 1 0 Density scale height is smaller than pressure scale height Not really useful 7 1 PARAMETER FILE RHD PAR 111 7 14 19 real c_radhtautop Boundary conditions open for essentially emergent radiation need the specification of the scale height of the optical depth to allow for small amounts of irradiation The parameter can be set e g with real c_radhtautop f E15 8 b 4 n Scale height of optical depth at top u 1 60 0E 05 Possible values are e C gt 0 0 Older version 79 x1 72 C x k x1 12 both MSrad and SHORTRAD e C lt 0 0 New version To zl z2 abs C x Hp x1 12 x k x1 x2 In this case a value of C_radHtautop 1 0 might be a good choice MSrad only 7 1 4 20 real rl rad For a star in a box and particularly when only simple ray directions are allowed in the radiation transport step the temperature in the outer corners of the box tends to become very small To artificially increase the effect of radiative heating the parameter r1_rad can specify a radius beyond which only positive contributions of the radiative energy transport to the energy budget are taken into account T
294. ul for debugging purposes Chapter 8 Output and status files 8 1 Output model files rhd end rhd full If the UIO scripts Sect 6 2 6 are properly installed you can view the contents more precisely the headers of the data entries of an UIO file with uiolook filename e g uiolook gives the fileform uio form unformatted convert ieee_4 version 0 1 2000 11 26 amp date 02 01 2002 16 17 26 036 system craSHi machine craSHi osrelease 10 0 0 6 amp osversion UoK 4 hardware CRAY SV1 language Fortran90 program RHD st35gm04n05_03 end output slightly edited character file_id f A8 b 8 n File identification character description d 1 1 f A24 p 1 b 24 n File description character history d 1 20 f A80 p 1 b 80 n File history character version f A80 b 80 n Program version label dataset n RHD model date 02 01 2002 16 17 26 043 character dataset_id f A10 b 10 n Type of box hierarchy real modeltime f E13 6 b 4 n time u s real modeltime_db f E23 15 b 8 n time u s integer modelitime f I11 b 4 n time step number u 1 real dtime f E13 6 b 4 n time step u s real time_out_full_last f E13 6 b 4 n Time of last output of full model u s real time_out_mean_last f E13 6 b 4 n Time of last output of averaged data amp u label box date 02 01 2002 16 17 26 049 character box_id f A80 b 80 n Block identification integer dimension d 1 2 1 3 f I7 p 6 b 4
295. uld be set to zero The value of a factor in front of these terms can be set e g with real c_hydpredfactor f E15 8 b 4 amp n hydrostatic pressure reduction in waves 3 and 6 u 1 amp c0 0 0 Deactivation of pressure reduction terms amp c1 1 0 Activation of pressure reduction terms default 0 0 Possible choices are e 0 0 Deactivation of pressure reduction terms in waves 3 and 6 in Roe solver e 1 0 Activation of pressure reduction terms in waves 3 and 6 in Roe solver default This parameter is only recognized for hdEntropyWaveMode Normal which is not recommended any more This parameter is not recognized by the MHD module 7 1 9 17 real c_hydsdiffvelo With this parameter an extra energy diffusion down an entropy step after reconstructing the entropy can be activated For the diffusion velocity all three velocity components are used i e there is a diffusion even transversal to the flow speed This makes the diffusion more isotropic and lets numerical solutions to the Sedov blast wave problem look smoother The value can be set e g with 7 1 PARAMETER FILE RHD PAR 129 real c_hydsdiffvelo f E15 8 b 4 amp n Parameter for energy diffusion down an entropy step u 1 amp c0O typically 1 0 1 0 Possible choices are for example e 0 0 No extra energy diffusion down an entropy gradient default e 0 2 Small value e 1 0 Reasonable value e 3 0 Large value It acts on the entropy bu
296. ults are shown in Fig The number of resulting chunks for step HYD1 the values for HYD2 HYD3 and VIS are very similar total memory performance and the wall clock duration of the hydrodynamics and the viscosity routines are shown as functions of the chunk size parameter s Clearly the number of chunks decreases towards larger chunk sizes whereas the required memory increases in particular for very large chunk size values Moreover performance and CPU time can be optimized by choosing the right parameter values Interestingly the optimum chunk size is different for hydrodynamics and viscosity Based on these tests a larger value seems to be preferable for the viscosity n_viscellsperchunk In the case of the smaller model 50000 seems to be fine for the hydrodynamics whereas the optimum viscosity chunk size is 200000 This difference explains the double peaked structure of performance and CPU time Note that the optimum values do not only depend on the architecture used but also on the dimensions of the model We recommend to test some chunk size values since it might lead to a higher performance 4 6 6 IBM Useful links IBM compiler documentation IBM XL Fortran especially IBM AIX compiler information center Particularly useful hints Porting Programs from the Crays to the SP The compiler to be used for OpenMP runs is called with x1f90_r which binds the object files to the thread safe components IBM documen
297. ut edad 156 11 213 real dtime_out_meanl a sso sao eee 157 7 1 21 4 integer n_outslicedim_mean e 157 7 1 21 5 integer outdim chul ooa aa e 157 7 1 21 6 integer outdim_chu2 gt gt seos ae ma a a a ee eee eee 157 7 1 21 7 integer outdim chud o 157 11 218 character infile start l 158 7 1 21 9 integer ISteP IMeStart gu soa be ee we a eee a 158 71 21 10 character outfileendl 0 00000002200 G 158 11 21 11 character outfle fulll ee 158 7 1 21 12 character outfile mean oaoa ao a a a 158 7 1 21 13 character outfile mceyl 158 11 21 14 character outfile_chul e ossy e raae a A e a E AA ES 159 7 1 21 15 character outfile_chu2 e a a en 159 7 1 21 16 character outfile_ChuBl a ae e eee ee eee 159 71 21 17 character outtorm end 159 7 1 21 18 character outconv endl oa s sere 0 ES Eara 159 7 1 21 19 character outformfullf eadar ee es 159 7 1 21 20 character outconv full es 160 7 1 21 21 character outform meanl sa seers dd een 160 T12127 character outconv mean s scs sa a ee en 160 Scale and test parameters ao a a a a 160 7 1 22 1 real time_scalestaltl aoa a a a a a 160 7 1 22 2 real time_scaleendl a a a a 161 7 1 22 3 integer n testl na ee EER ew a 161 11 224 Teale test e osas Zr wan Bet aa dreke a ik de da a 161 71 225 character strtestll e 161 CONTENTS 11
298. v Using r2_grav instead of r1_grav means that a potential function more appropriate for a polytropic stellar interior model is used It can be set e g with real r2_grav f E15 8 b 4 n Quter Smoothing Radius u cm amp c0O 0 0 Not used 11 35000e 13 Setting this parameter to zero means the potential parameterized with r1_grav is used This pa rameter is similar to r1_grav i e it enlarges the pressure scale height in the outer layers but does not change the smoothing formula in the center This parameter is only effective if r1_grav is set to zero 7 1 3 8 real r0_core To insert energy in a sphere different with a radius other than r0_grav the default the heating radius r0_core can be specified separately e g with real r0_core f E15 8 b 4 n Core Radius u cm 9 45833e 12 If this parameter is not specified or set to zero r0_grav is used as the radius of the core 7 1 PARAMETER FILE RHD PAR 105 7 1 3 9 character centrifugal force Usually a centrifugal force is applied if nu_rotation40 To switch it off even for a non zero rotation rate the parameter centrifugal force can be used e g by setting character centrifugal_force f A80 b 80 n Switch on off the centrifugal force amp cO on default off no centrifugal force even for non zero nu_rotation off Two alternative values are possible so far e on This is the default and can be set even for non rotating objects e off This skips the
299. version type native e g ieee_4 have to be specified The formatted ASCII data representation allows I O independent of platform or compiler It is useful for parameter files which can be read and edited by hand for the direct inspection of data the transfer between very different systems or for the import of data which exist e g in a table format From the specified conversion type only the default output format for numbers e g E13 6 for 4 byte reals is determined The unformatted binary I O is much faster and gives usually more compact files with higher accuracy ideally exact in the numerical data representation But in principle the file format is machine dependent Fortunately the IEEE format turns out to become a quasi standard among a variety of machines Most workstations work internally with this format Some CRAYS which have a different internal data representation allow the hidden transformation between the internal and IEEE format during the I O process The UIO routines support this feature of CRAY FORTRAN compilers by means of a module uio_mac_module individually designed for two types of CRAY machines using certain CRAY specific system calls CRAY FFIO assign logic Nevertheless there is also a machine independent version of this module written completely in standard Fortran90 but providing less features than the machine dependent versions Besides the format the conversion type see table
300. w 1 make no sense for the current dust model 7 1 13 2 real c_dust02 The oxygen abundance is specified with e g real c_dust02 f E15 8 b 4 n Oxygen abundance u 1 6 606934E 04 7 1 13 3 real c_dust03 The cutoff for the integration of the degree of condensation is specified with e g real c_dust03 f E15 8 b 4 n cutoff for integration of degree of condensation amp u 1 1 0E 05 7 1 13 4 real c_dust04 The relative dust opacity factor is specified with e g real c_dust04 f E15 8 b 4 n Relative dust opacity factor u 1 1 0 7 1 14 Dust dustscheme dust_k3mon_03 In this section the parameters for dustscheme dust_k3mon_03 simple 2 bin dust scheme for forsterite dust are described 7 1 14 1 integer n_dustgrainradius The number of dust grain radius bins including one for the monomers is specified with integer n_dustgrainradius f 18 b 4 n Number of dust grain radius bins amp ci Includes bin for monomers 2 The default value is 1 to avoid an empty array The value should be the same as the upper dimension in real ar_dustgrainradius For the current dust scheme there should always be exactly two bins 7 1 14 2 real ar_dustgrainradius The radii of the dust grains are specified with e g real ar_dustgrainradius f E10 4 b 4 p 1 d 1 2 n Dust grain radii u cm 0 0 1 0E 04 The default value is 0 0 7 1 14 3 real c_dust01 The density of the grain material is specified with e g real c_dust
301. w monomers the condensation rates can be very small in this dust model nucleation that would form already small clumps of monomers is not considered Therefore to speed things up a minimum number of monomers can be given that is considered for the condensation rate With 1 0 or smaller values the enhancement is switched off The default value is 0 0 7 1 14 8 real c_dust06 The sticking coefficient for the condensation rate is specified with e g real c_dust06 f E15 8 b 4 n Sticking coefficient u 1 amp cO0 For C rich dust 0 37 can be between O and 1 1 0 The default value is 0 0 7 1 15 Dust dustscheme dust bins 01 In this section the parameters for dustscheme dust_bins_01 multi size bin dust scheme for forsterite dust are described 142 CHAPTER 7 INPUT AND CONTROL FILES 7 1 15 1 integer n_dustgrainradius The number of dust grain radius bins including one for the monomers is specified with integer n_dustgrainradius f 18 b 4 n Number of dust grain radius bins amp ci Includes bin for monomers 8 The default value is 1 to avoid an empty array The value should be the same as the upper dimension in real ar_dustgrainradius 7 1 15 2 real ar_dustgrainradius The radii of the dust grains are specified with e g real ar_dustgrainradius f E15 8 b 4 p 1 d 1 8 n Dust grain radii u cm 0 00390625E 04 0156250E 04 06250E 04 25000E 04 00000E 04 00000E 04 16 0000E 04
302. x label box date 25 05 2001 09 41 30 359 character box_id f A80 b 80 n Block identification Z label endbox label enddataset date 25 05 2001 09 41 30 489 There a six sub blocks delimited with box and endbox labels They contain surface intensity and flux arrays rad averages in the 23 plane z1 the 13 plane z2 the 12 plane z3 and over spherical shells r and a 2D slice through the model z An individual box inside a dataset entry in a mean file can have e g the following contents describing horizontal averages in a plane parallel model With uiolook chro2D03c008_01 mean less you get this and more label box date 06 11 2002 17 58 05 533 character box_id f A2 b 2 n Block identification integer dimension d 1 2 1 3 f I7 p 6 b 4 real time f E13 6 b 4 n time u s real time_db f E23 15 b 8 n time amp u s integer itime f 110 b 4 n time step number amp u 1 real xc1 d 1 1 1 1 1 1 f E13 6 p 4 b 4 n x1 coordinates of cell centers amp u cm amp ds 0 0 0 1 0 1 real xc2 d 1 1 1 1 1 1 f E13 6 p 4 b 4 n x2 coordinates of cell centers amp 170 CHAPTER 8 OUTPUT AND STATUS FILES u cm amp ds 0 1 0 0 0 1 real xc3 d 1 1 1 1 1 120 f E13 6 p 4 b 4 n x3 coordinates of cell centers amp u cm amp ds 0 1 0 1 0 0 real xbi d 1 2 1 1 1 1 f E13 6 p 4 b 4 n x1 coordinates of cell boundaries amp u cm amp ds 0 1 0 1 0 1 real xb2 d 1 1 1 2 1 1 f E13 6 p
303. xe Its name can of course be changed afterwards The names of the control files rhd par rhd stop rhd cont and rhd dump and of the status file rhd done cannot be changed without modification of the source code The names of EOS opacity and CO5BOLD data files can be chosen freely in the parameter file rhd par Table only contains dummy names 6 2 UIO data format 6 2 1 Quickstart Introduction to UIO The UIO Universal Input Output routines are a set of routines in Fortran90 and IDL to manage I O of scalars arrays and a certain table type Files can be formatted or unformatted The formatted ASCII text data representation is machine independent and appropriate for human reading for short files The binary representation uses the Fortran unformatted read and write routines provides much faster I O gives smaller files and the IEEE format is a quasi standard among many platforms compilers On all machines the native binary representation can be chosen On some platforms additional conversion types are offered IEEE on most machines CRAY format an CRAYs The Fortran standard does not guarantee that unformatted i e also UIO files are readable on all machines But it is always possible to produce formatted UIO files on a machine which are readable on all others And with some fiddling with compile options or the call of machine specific subroutines provided by the compiler vendor it was up to now always possible to enable t
304. y to the Normal Roe averaging for large Mach numbers e CAiMs Use the consistent advection centering for the average enthalpy flux as in CA1 for small Mach numbers Switch smoothly to the Normal Roe averaging for large Mach numbers or large entropy fluctuations e CAlp Use the consistent advection centering for the average enthalpy flux as in CA1 for small pressure fluctuations Switch smoothly to the Normal Roe averaging for large pressure fluctuations e CAis Use the consistent advection centering for the average enthalpy flux as in CA1 for small entropy fluctuations Switch smoothly to the Normal Roe averaging for large entropy fluctuations 128 CHAPTER 7 INPUT AND CONTROL FILES e CA2 Average the enthalpy plus kinetic energy and multiply with the average mass flux e CA2g Use the consistent advection centering for the average enthalpy plus kinetic energy flux as in CA2 for small fluctuations Switch smoothly to the Normal Roe averaging for large non hydrostatic pressure fluctuations e CA2M Use the consistent advection centering for the average enthalpy plus kinetic energy flux as in CA2 for Mach numbers Switch smoothly to the Normal Roe averaging for large Mach numbers e CA2p Use the consistent advection centering for the average enthalpy plus kinetic energy flux as in CA2 for small pressure fluctuations Switch smoothly to the Normal Roe averaging for large pressure fluctuations e CA2s Use the consistent advection centering
305. yd_RoeWaveiDflux rhd_hyd_RoeStateiDflux rhd_hyd_Dust rhd_hyd_mhd rhd_hyd_RoeiDStep rhd_bound_3DHeatBottom CHAPTER 5 PROGRAMMER S GUIDE Print information about used compiler switches Adjust density values in top cells for the open boundary condition Adjust values in bottom cells to fulfill the open boundary condition Modify energy in central cells to keep entropy constant Modify energy in bottom cells to keep entropy constant Adjust values in top or bottom cells for transmitting boundary condition Extract some averaged quantities Compute 1D energy flux down an entropy step with state reconstruction Compute 1D flux from state vector for single quantity Compute reduced pressure as gravity correction for Roe solver Compute 1D Roe sound wave fluxes Compute 1D Roe entropy wave and ionization energy fluxes Compute 1D Roe transversal momentum fluxes Compute 1D internal energy flux from the fluxes of individual waves Compute 1D Roe fluxes with wave reconstructions Compute 1D Roe fluxes with state reconstructions Advect passive tracers Advect magnetic fields Perform 1D hydrodynamics step in x1 direction with Roe scheme l rhd_hyd_RoeiDMincedStep Perform 1D hydro step in x1 direction call Roe solver repeatedly rhd_hyd_SingleStep gt rhd_hyd_Step CALLING TREE rhd_hyd_SwitchInfo rhd_bound_3DCenter rhd_bound_3DHeatBottom rhd_hyd_Step rhd_hyd_SingleStep eo
306. ydtdiftlin eos ss a ea ea dae hk ee ee ee 129 7 1 9 20 real c_hydtdiffmach o e e 130 7 1 10 Hydrodynamics control MHD only o ooo e 130 7 1 10 1 character hdcheckflux o o e e o 130 7 1 10 2 integer n_orderconstrainedtransport ee 130 7 1 10 3 integer n_rescellsperchunk o o e 131 7 1 10 4 real c_rescourant ee 131 7 1 10 5 real c_rescourantmaxl eeen 131 7 1 10 6 real e resb ki 4 4 zn Be ee e Yee ee Re ARG BR e 131 7 1 10 7 real c TESbDCOMS l ee 131 7 1 10 8 real c resepsilon eeen 132 7 1 10 9 real beta inv ee 132 71 10 10 real va max eee 132 7 1 10 11 integer n_magdiffside 2 2 2 ee ee 132 7 1 10 12 integer n_magdifftop eee 132 7 1 10 13 integer n_magdiffbottom e 133 7 1 11 Tensor viscosity control o o 133 7 1 11 1 integer n_visiter 2 2 a E a a a a 133 7 1 11 2 real c_vissmagorinsky 2 0 o e 133 7 1 11 3 real c_visartificial o toa de teada 134 7 1 11 4 real G Visexpansloni s oa a e m er en eed a da ee 134 7 1 11 5 real c_vislinear o ee 134 7 1 11 6 real c visprturb oe oe eo ee ea a eG ee ee a 134 7 1 11 7 real c_vistensordiagl a 134 7 1 11 8 real c_vistensoroff 2 0 e 135 7 1 11 9 real c_vistensordiv eee 135 7 1 11 10 real c_visp2pcoeff ee 135 7 1 11 11 real c_visp2phypsmagorin

Download Pdf Manuals

image

Related Search

Related Contents

SnowMicroPen a high resolution snow micro penetrometer  English - Nanni Diesel Range  第9次須賀川市交通安全計画  2.3. Déroulement de l`entretien    PMPOCA`S PATIENT MANAGEMENT PROGRAM  くらしの情報No309(PDF:1405KB)  AMX NXD-430-WH  環境社会報告書 全ページをダウンロード  manual de usuario (espanol) - Tecno-Gaz  

Copyright © All rights reserved.
Failed to retrieve file