Changes between Version 1 and Version 2 of DataScaling
- Timestamp:
- 07/09/11 16:05:31 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DataScaling
v1 v2 11 11 === Data File Parameters === 12 12 13 The "true" scales are: 14 ||rScale||density scale|| 15 ||pScale||pressure scale|| 16 ||lScale||length scale|| 17 ||!VelScale||velocity scale|| 18 ||!RunTimeSc||time scale|| 19 ||BScale||Magnetic field scale|| 20 ||!ScaleGrav||acceleration scale|| 13 The most basic physical scaling options are set by the user in the [PhysicsDataExplained physics.data] file: 21 14 22 In addition there are a few proxies: 15 ||nScale||number density scale (cm^-3^)|| 16 ||rScale||density scale (g cm^-3^)|| 17 ||pScale||pressure scale (dynes cm^-2^)|| 18 ||!TempScale||temperature scale (K)|| 19 ||lScale||length scale (cm)|| 23 20 24 EOSConstants - Used to find the physical Temperature: T = EOSConstants*P/rho 21 AstroBEAR derives other scaling constants such as magnetic pressure and velocity from these basic parameters: 25 22 26 nscale - Used to find the physical number density: n = nscale*rho 23 ||!VelScale||velocity scale (cm s^-1^)|| 24 ||BScale||magnetic field scale (esu)|| 25 ||!TimeScale||time scale (s)|| 26 ||!ScaleGrav*||gravity scale (cm^3^)|| 27 ||!ScaleCool!**||cooling scale (erg^-1^ cm^3^)|| 27 28 28 [Note if nscale were truly a scale then nscale=1/(lscale^3^)] 29 *requires elliptic source terms.[[BR]] 30 !**requires cooling source terms. 29 31 32 Calculating the appropriate scales to use is not always a trivial task, especially if the important scale for your problem is a derived one. For instance, 33 {{{ 34 #!comment 30 35 !ScaleCool - !ScaleCool is used to scale the cooling rate Lambda which has units of erg cm^3^/s = erg/cm^3^ * cm^6^/s, so in theory !ScaleCool = pScale*lScale^6^/!RunTimeSc. However instead of dividing the physical cooling rate by !ScaleCool to get the computational cooling rate, it is easier to multiply by the reciprocal, so !ScaleCool is actually the inverse: !ScaleCool=!RunTimeSc/pscale/lscale^6^. Since the cooling rate also depends on the physical number density^2^, we include a factor of nScale^2^ so that de/dt = rho^2^*!ScaleCool*(Physical Cooling rate). So, !ScaleCool=!RunTimeSc*nScale^2^/(pScale*lScale^6^) = rScale*lScale/((hMass**2)*Xmu**2*!VelScale**3)) 31 36 32 37 In general to convert from a quantity in cgs units to computational units you divide by the corresponding scale, and there are only three independent scales. Fundamentally these would be mass length and time, however its usually easier to set the density (or number density) scale, pressure (or temperature) scale, and length scale. In the code, the pressure and density scales are set first. These combine to define a velocity scale, but the three fundamental scales of mass, length, and time are still free. Setting the length scale then determines the time scale and the mass scale. If there were a mass scale it would just be rScale*lScale^3^. (Again, setting the mass scale to be rScale/nScale would not be right since nScale isn't a true scale.) 33 34 To convert computational magnetic field strengths to gauss multiply by sqrt(4*Pi*pScale). See the second page of the attached pdf for the reasoning. 35 36 Additional information on the scaling parameters may be found in the attached PDF. 37 38 [[BR]] 39 40 === Called In: === 41 42 [wiki:i_setprob setprob] :: [wiki:setprob setprob()] 43 44 [[BR]] 45 46 === Modules Used: === 47 48 None are brought in by the {{{USE}}} statement, but it assumes that [ReadPhysics ReadPhysics()] has been called. 49 50 [[BR]] 51 52 === Files Included: === 53 54 None. 38 }}}