Version 1 (modified by 12 years ago) ( diff ) | ,
---|
Computation Scales
In general the computational scales you set in physics.data are not that important and should not effect the simulation at all (unless you're scaled values are below 1e-300 or greater than 1e300 in which case double precision values will have under/over flow issues) - however careful choices can help in understanding the results… For example if nScale is chosen to be the ambient density and lScale is chosen to be the box size and tScale is chosen to be the runtime - then ScaleGrav immediately tells you how important gravity is etc… From a theoretical point of view it is often convenient to scale density, length, and time to physically motivated values (ie jeans length, mean density, free-fall time) etc… since it is convenient to think about values in these units. From an observational point of view, however, it is often convenient to use an nScale of 1, a TempScale of 1 and an lScale of either 1pc ~ 3e19 cm or 1AU ~ 1.5e18 cm depending on the problem. You could also use a rhoScale of 1, a pScale of 1, and an lScale of 1 if you wanted your data files to be in cgs units. For more help on working with computational scales see SimulSetup
Astrophysical problems involve many different physical units and constants with a wide range of scales. To avoid the loss of precision that comes when computers try to work with, say, a 10-8 variable and a 1024 constant in the same expression, we scale our units into computational units before storing them in the data arrays.
Usually, the physical scales are defined in the physics.data file—you simply enter the scales for density, temperature, velocity, etc in that file, and AstroBEAR will read them in. More complicated scaling would be defined in the ProblemModuleInit()
routine (see above).
You have two options for making sure that you only put scaled quantities in the data arrays: you can scale your input values before you enter them into your input file (and then assume that you are reading in scaled quantities), or you can use physical quantities in your input files and then scale them within your problem module