alekseygenerozov / hydro Goto Github PK
View Code? Open in Web Editor NEWRudimentary hydro code
Rudimentary hydro code
Organization of these galaxies is confusing. Each is a specific kind of galaxy and yet NukerGalaxy inherits from the Galaxy class, and PowGalaxy inherits from NukerGalaxy.
This makes the code very difficult to read, and it would probably be difficult for the user to define new custom galaxy types.
gal_params={'NGC3165':{'beta':0.86, 'gamma':1.78, 'Uv':4.1, 'M':3.6E7*galaxy.M_sun, 'alpha':4.29, 'Ib':2093., 'rb':89.2}}
gal=galaxy.NukerGalaxy('NGC3165',gal_params,init={'rmin':5.0E16, 'rmax':1.0E19})
gal.rmin_star=(1.55E17/(galaxy.pc))
gal.rinf returns 1.1E19 (expected 2.6E17) and prints warning
/Users/aleksey/code/python/nuker_catalog/galaxy.py:1957: RuntimeWarning: divide by zero encountered in log10
return np.log10(self.params['M'])-np.log10(self.M_enc(10.**log_r))
The last state of the pickled grid may not correspond to the last time slice of the saved array (which stores the state of the grid at regular time intervals).
The adjust parameter does not respect the order in which parameters are written under the adjust keyword.
Every time a parameter is set using set_param the info is written to the log even if the parameter is not changed in practice.
Value in ghost zones is updated before the _update_ghosts routine is called.
This could be problematic for evaluating boundary conditions, especially ones where the value in the outer ghost cell is to remain fixed! ('s_fixed', 'temp_fixed'). Extrapolative boundary conditions should be ok...(as value in ghost cells would be overwriten by the extrapolation anyways...
Artificially set time derivatives in ghost zone to 0?
When code is run with (anaconda python 2.7.8), interpolation function functions don't work on machine with anaconda python 2.7.12...
Trapezoidal rule is used in the routine cons_check (as there were issues zero order intergration when the integration intervals were very one-sided).
But the plot of flux difference vs. sources is always calculated using a zero-order integral. (Flux difference across each cell is plotted vs. the integrated source across each cell).
At small radii close to the value of rmin_star, the _rho_stars_interp (which is used to calculate the grid of mass enclosed values).
Evidently, the inner-most value in the table used to compute density interpolation function is sometimes 0 (note that the density is defined to be zero inside of radius rmin_star). The interpolation function is computed in log space, so we can get in trouble when we try to take the log of 0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.