dullemond / radmc3d-2.0

64 stars 37 forks source link

Issue on mirror symmetry #20

Open mr91i opened 2 years ago

mr91i commented 2 years ago

When I was doing synthetic observations of a molecular line for disk-like structure with face-on view, I noticed that the line profile shows asymmetry. I was using the mirror symmetry with a 2d spherical coordinate and a optically thin line, and so the face-on observations should have showed the symmetric line.

I reproduce the issue using a default example file run_ppdisk_simple_1_line/problem_setup.py with assuming vtheta = 1 km/s and low molecular abundance:

vr       = np.zeros_like(rr)
vtheta   = np.ones_like(rr) * 1e5
vphi     = np.zeros_like(rr) 
...
abunco = 1e-30

Also, the plotexample.py file is like this:

c = 2.99792458e10
au = 1.49597870700e13
command  = 'radmc3d image imolspec 1 iline 2 incl 0 vkms 0 widthkms 1.5 linenlam 30 npix 100 noscat nostar nodust'
os.system(command)

# Read the image
im = readImage()
mol = readMol(fname="molecule_co.inp")
freq0 = mol.freq[1]
im.vkms = c / 1e5 * (freq0 - im.freq) / freq0

# Plot
jcenter = int(len(im.y)//2)
plt.pcolormesh(im.x/au, im.vkms, im.image[:, jcenter, :].T, shading="nearest", rasterized=True)
plt.xlabel("offset from center [au]")
plt.ylabel("line-of-sight velocity [km/s]")
plt.show()

The attached figure is the resulting position-velocity diagram. pv.pdf We can see that the intensity for positive velocity is stronger than that for negative velocity.

Actually, when the grid in the θ direction just before the equatorial plane is finer, this symmetry disappear. So, now i am understanding it as the issue on the interpolation at the boundary of mirror symmetry.

Then, I would like to know wether this issue should be addressed on the user side or the code side. Thank you.

dullemond commented 2 years ago

Dear Shoji,

Interesting... Strange indeed! If you do not use mirror symmetry, i.e. just set up a grid that covers both sides of the equatorial plane, does the problem then disappear too?

Do you use second order integration (interpolation-based)? Or just first order (cell based)?

I'd have to look more carefully into this. At the moment I am, however, short on time.

Thanks for reporting this! If I find the origin of the problem, I'll post it here and fix it. Please remind me if I haven't fixed it within a few weeks time.

Best wishes, Kees

mr91i commented 2 years ago

Dear Kees,

When I use the grid that covers full theta direction, the velocity asymmetry does not appear. pv

I have tested only for the first-order integration. I also have tried to use the second order, but the results looks strange: the intensity in the negative velocity completely disappears. pv This might be related to the issue I have reported originally, but I am not sure at all. Also, this may be due to my lack of understanding of how to use radmc3d, so it may be good to double check. Anyway I hope this also helps our understanding. In case, I attach below the full line of the script.

I know you don't have much time, so please let me know if there is anything I can help.

Best regards, Shoji

problem_setup.py.txt problem_plotexamples.py.txt (Please delete .txt if you use the codes. This is just for a prescription sending python codes in github issue.)