Comments (2)
this approach is done in Castro now. As pyro is not meant to be a research
code, I opted for simplicity here.
On Mon, Nov 30, 2015 at 9:56 AM, Ben Wibking [email protected]
wrote:
Energy conservation with body forces can be substantially improved if the
mass fluxes are used, instead of the cell-centered estimates of the work.
For general body forces, I have tested:energy_update = 0.5*dtdy*(Flux_y.v(n=self.vars.idens) + Flux_y.jp(1,n=self.vars.idens)) * \ 0.5*(old_yacc_src.v() + yacc_src.v())*myg.dy energy_update += 0.5*dtdx*(Flux_x.v(n=self.vars.idens) + Flux_x.ip(1,n=self.vars.idens)) * \ 0.5*(old_xacc_src.v() + xacc_src.v())*myg.dx ener.v()[:,:] += energy_update
This is identical to the formulation in Springel 2010 (the Arepo paper).
I also switched the half-step prediction using the primitive variables:
V_l[1:,:,vars.iu] += 0.5*dt*0.5*(xacc_src.d[0:-1,:]+xacc_src.d[1:,:]) V_l[1:,:,vars.iv] += 0.5*dt*0.5*(yacc_src.d[0:-1,:]+yacc_src.d[1:,:]) V_r[1:-1,:,vars.iu] += 0.5*dt*0.5*(xacc_src.d[2:,:]+xacc_src.d[1:-1,:]) V_r[1:-1,:,vars.iv] += 0.5*dt*0.5*(yacc_src.d[2:,:]+yacc_src.d[1:-1,:])
``
and likewise for the y-direction. This seems to work well, though there may be a better way to do the indexing for the half-step variables.—
Reply to this email directly or view it on GitHub
https://github.com/zingale/pyro2/issues/5.
Michael Zingale
Associate Professor
Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY
11794-3800
phone: 631-632-8225
e-mail: [email protected]
web: http://www.astro.sunysb.edu/mzingale
github: http://github.com/zingale
from pyro2.
That is good to know. It is not apparent from the documentation. It is much easier to learn the state-of-the-art techniques if I only have to read through thousands of lines of source code, rather than tens of thousands of lines!
from pyro2.
Related Issues (20)
- make regression testing github action HOT 1
- Add a notice that the docs on readthedocs.io are outdated HOT 2
- Top-level `examples` module can break other packages
- store x2d and y2d as ArrayIndexer objects
- create axisymmetric grid class
- lm_atm-bubble regression test fails with numpy 1.24 HOT 5
- allow Pyro class to take name of function for initial conditions
- viscous burgers image is missing HOT 1
- "Latest release" on GitHub release page points at 2014 paper version HOT 1
- Setting PYTHONPATH is unnecessary? HOT 3
- Consider making pyro2 pip-installable HOT 3
- Consider adding support for pyro to yt
- Add _skeleton directory to help make new solvers/problems HOT 1
- add python 3.7 to testing
- well balanced scheme doesn't work anymore? HOT 1
- Error in terminal when animation is running and you click the animation
- Trouble implementing PLM reconstruction in C++ HOT 3
- Convert CI to GitHub actions
- add widget support to Jupyter notebooks HOT 3
- fix pyro setup.py installation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyro2.