Changeset 198:9a4ff86f7996 for source/class/pf
- Timestamp:
- Feb 2, 2011, 8:44:07 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/class/pf/Application.js
r197 r198 2132 2132 var config = new Object; 2133 2133 2134 // version of config format 2135 config.format_v = 1; 2136 2134 2137 config.N_e = this.plasma.e.getN(); 2135 2138 … … 2179 2182 2180 2183 if (config) { 2181 this.plasma.e.setN(config.N_e); 2182 2183 this.plasma.e.setT(config.T_e); 2184 this.plasma.i.setT(config.T_i); 2185 this.plasma.r.setT(config.T_r); 2186 2187 this.plasma.i.setM(config.M_i); 2188 this.plasma.r.setM(config.M_r); 2184 var au_fn, au_fT, au_fM, au_fB; 2185 if (!config.format_v) { 2186 // old format, rescale data 2187 au_fn = pf.base.Bohr.n0; 2188 au_fT = pf.base.Bohr.E0; 2189 au_fM = 1/pf.base.Bohr.m_p; 2190 au_fB = pf.base.Bohr.B0; 2191 } else { 2192 au_fn = 1; 2193 au_fT = 1; 2194 au_fM = 1; 2195 au_fB = 1; 2196 } 2197 2198 this.plasma.e.setN(config.N_e/au_fn); 2199 2200 this.plasma.e.setT(config.T_e/au_fT); 2201 this.plasma.i.setT(config.T_i/au_fT); 2202 this.plasma.r.setT(config.T_r/au_fT); 2203 2204 this.plasma.i.setM(config.M_i/au_fM); 2205 this.plasma.r.setM(config.M_r/au_fM); 2189 2206 2190 2207 this.plasma.i.setQ(config.Q_i); … … 2193 2210 this.plasma.P_r = config.P_r; 2194 2211 2195 this.plasma.B = config.B 2212 this.plasma.B = config.B/au_fB; 2196 2213 2197 2214 this.plasma.n_u = config.n_u;
Note: See TracChangeset
for help on using the changeset viewer.