<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Jon,<div><br></div><div>I tried recently to implement a short-range force (self-interacting dark matter) but the climb was pretty steep in terms of implementation and I ended up switching to another code which had this particular feature already, for no other reason than it was quicker for me. The main difficulty was handling interactions between particles on different processors without allocating huge metadata arrays. </div><div><br></div><div>If you’re adding drag to particles based on interpolation from grid variables, this should be far easier. You can use the same Grid_mapMeshToParticles functionality which is used for gravity.</div><div><br></div><div>I think that the reason for the “ParticleMesh” subdirectory is mostly historical—originally it was thought that we might have ways of applying gravitational acceleration to particles which didn’t require the mesh.</div><div><br></div><div>John <br><br><div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span style="background-color: rgba(255, 255, 255, 0);">=====================================</span></div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span style="background-color: rgba(255, 255, 255, 0);">John ZuHone, Chandra/ACIS Operations<span class="Apple-tab-span" style="white-space: pre;">                      </span></span></div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span style="background-color: rgba(255, 255, 255, 0);">Harvard-Smithsonian Center for Astrophysics<br class=""><br class=""></span></div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><a href="x-apple-data-detectors://1" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="address" x-apple-data-detectors-result="1" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">60 Garden St.</a>, MS-67<span class="Apple-tab-span" style="white-space: pre;">           </span>(w) <a href="tel:617-496-1816" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2/0" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">617-496-1816</a><br class=""><a href="x-apple-data-detectors://2/1" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="address" x-apple-data-detectors-result="2/1" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">Cambridge, MA 02138</a><span class="Apple-tab-span" style="white-space: pre;">             </span>(m) <a href="tel:781-708-5004" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2/2" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">781-708-5004</a></span></font></div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><a href="mailto:john.zuhone@cfa.harvard.edu" class="">john.zuhone@cfa.harvard.edu</a><br class=""><a href="http://hea-www.cfa.harvard.edu/~jzuhone" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="4">http://hea-www.cfa.harvard.edu/~jzuhone</a><br class="">=====================================</span></font></div></div><div><br>On Apr 24, 2018, at 4:27 PM, Slavin, Jonathan <<a href="mailto:jslavin@cfa.harvard.edu">jslavin@cfa.harvard.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Hi all,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">I'm looking to add a short range particle forces (drag) to Flash and wondered if anyone had done that yet (successfully). If so, any advice would be appreciated. Also, I'm wondering why the gravity force needs a subdirectory ParticleMesh under source/Particles/ParticlesForces/longRange/gravity</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Regards,</div><div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">​Jon​</div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">________________________________________________________<br>Jonathan D. Slavin                 Harvard-Smithsonian CfA<br><a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>       60 Garden Street, MS 83<br>phone: (617) 496-7981       Cambridge, MA 02138-1516<br>cell: (781) 363-0035             USA<br>________________________________________________________<br><br></div></div></div></div>
</div>
</div></blockquote></div></body></html>