Comments (3)
Hi Eloy,
Thanks for the comment. This is a bit different from what REBOUNDx currently does (just calculating accelerations on individual particles), and presumably would require some specialized ray-tracing methods (?). It's probably outside the scope of what we are likely to implement in REBOUNDx, but I'm happy to answer questions if you wanted to try and implement this for yourself!
from reboundx.
One possible approach might incorporate a shadowing effect. This effect would cause the radiation pressure to drop to zero as particles move 'behind' an active particle within the system. This could be achieved by introducing a cylindrical shape with a radius matching that of the shadowing object (the active particle that blocks the radiation), as the particles are spherical in REBOUND. The cylinder's axis would intersect with the source particle, and it would be assumed that this cylinder extends infinitely from the source, in a direction opposite to that of the source.
Radiation forces should only be canceled when the particle is farther away from the source than the shadowing particle. Then it should be checked if the distance from the particle to the axis of the cylinder is less than or equal to the radius of the cylinder (which is the radius of the shadowing particle).
Something like that in Python:
def is_in_shadow(particle_pos, source_pos, shadowing_pos, shadowing_radius):
height = np.linalg.norm(shadowing_pos - source_pos)
axis = (shadowing_pos - source_pos) / height
particle_to_base = particle_pos - source_pos
distance_to_axis = np.linalg.norm(np.cross(particle_to_base, axis))
if distance_to_axis <= shadowing_radius:
position_along_axis = np.dot(particle_to_base, axis)
if height <= position_along_axis:
return True
else:
return False
else:
return False
from reboundx.
That seems like a reasonable approach depending on the application, but things also get complicated right? Does partial shadowing / the penumbra matter? You also potentially run into issues with the integration timestep to resolve these shadow crossings. If you or someone else wants to do a lot of work with this and would be willing to write it in C and test it, we could add a flag to the radiation_forces effect that turns this check on and off. I'll close this for now, but feel free to ask questions if you are interested in taking this on!
from reboundx.
Related Issues (20)
- Problem with the example: full version of yarkovsky_effect: Python 2.7 HOT 8
- Yarkovsky effect in Reboundx : question about the 'k' coefficient HOT 2
- Question additional forces HOT 5
- Signed int HOT 2
- Need to attach reboundx.Extras instance to simulation before setting params. HOT 8
- Failed building editable for reboundx HOT 6
- Cannot reproduce the plot in InnerDiskEdge.ipynb HOT 1
- Trouble implementing new effect
- Extras not attatching to sim for Rebound 4.3.2 HOT 7
- "Process finished with exit code 139" when running example code HOT 4
- Error with setting gr.params in GR notebook HOT 12
- ReboundX - installing problem with Python HOT 1
- Getting warning/error with additional forces HOT 9
- Trouble Installing reboundx HOT 1
- Python QuickStart Guide HOT 2
- reboundx install failed on my Macbook HOT 6
- "OSError: librebound.cpython-37m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" when importing reboundx on Google Colab HOT 6
- REBOUNDx error: Force 'type_I_migration' not found in REBOUNDx library. HOT 5
- Setting beta via sim.particles[i].beta does not work? 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 reboundx.