OutflowWind:bug fix for planetParticle and pointGravity position

1. bug and fix

The code of co-rotating frame for results in blog:bliu06222015 and the results before hard-coded the position of particle and pointgravity object as (0,0,0). Since the origin point in the co-rotating frame should be the mass center and the planet position is at (200,0,0) (currently,will make more sophisticated). So this is a bug:

IF(.NOT. lRestart) THEN
      CALL CreateParticle(PlanetParticle)
      PlanetParticle%q(1)=planet_mass
      PlanetParticle%xloc=0
      PlanetParticle%radius=radius
     CALL CreatePointGravityObject(PlanetParticle%PointGravityObj)
      PlanetParticle%lFixed=.true.
      PointGravityObj=>PlanetParticle%PointGravityObj
      PointGravityObj%mass=planet_mass
      PointGravityObj%x0=PlanetParticle%xloc

The fix is set the PlanetParticle position to be Outflow%position —

      PlanetParticle%xloc=Outflow%position


2. Low-Res Results after the fix

After the bug-fix, the low-res results with omega=0 looks promising. The tight sonic surface problem in blog:bliu06222015 seems gone. But it's still not quite right for the gravity/mach number plot inside the planet —trying with higher res.

http://www.pas.rochester.edu/~bliu/OutflowWind/ForAdam/splineSoft/rhoV_splineSoft_particlePosFix_5ZonePerR.png;low res density move 5-zone-per-radii http://www.pas.rochester.edu/~bliu/OutflowWind/ForAdam/splineSoft/TV_splineSoft_particlePosFix_5ZonePerR.png;low res temperature move 5-zone-per-radii
http://www.pas.rochester.edu/~bliu/OutflowWind/ForAdam/splineSoft/splineSoft_particlePosFix.png log mach plot


plot of log|vx|
shows the unmatched gravity plot for 2D and 3D seems from the low-res of 3D plot. http://www.pas.rochester.edu/~bliu/OutflowWind/ForAdam/splineSoft/logVx_splineSoft_particlePosFix_5ZonePerR.png

3. 3D corotating with omega=0.5

http://www.pas.rochester.edu/~bliu/OutflowWind/ForAdam/splineSoft/RhoV_3Drho_omega0.5_spline_bugfix_frame58.png

movie for 8 or 16 zones per radii

Comments

No comments.