Thursday, March 6, 2008

Stellar Continuum with Flux

I will try another approach to solve the flux calculation problem I am having in the codes. I will calculate each component of the profile separately, doing one step at a time. First only the continuum coming from the star, then see what happens with the continuum under the optical depths of the magnetosphere, and the wind, but without the flux contribution from these sources. In this way I can see if the absorptions on the continuum are in the right place, and the velocities are right. Then I will calculate only the magnetospheric contribution to the profile, and I will do the same to the diskwind component. Then I can see where the broad wings are coming from. After figuring that out, I will finally and both component to the stellar continuum, and I hope to have a good profile at last.

During my first continuum calculation I noticed a problem that was happening for velocities just higher than zero velocity. I forgot to bypass the optical depth test, and with that the code bypassed all the continuum calculations from those velocities. After ignoring the optical depth test in 'intens.f', I have the right continuum again. I guess this problem might be linked to the always present deep red shifted absorption (more than expected, and every time) found in all the profiles calculated so far. I need to take a deeper look at that.

The continuum calculated is in the file named 'prof.60.ha.mmax_7700K.dmax_7700K.continuum'. That is for a 60 degree inclination, the h-alpha line, maximum temperature in the magnetospheric funnel of 7700K, and maximum temperature in the diskwind region of 7700K. The stellar parameters are for a typical Classica T Tauri Star:
  • Mass: 0.5 Msun
  • Radius: 2.0 Rsun
  • Photospheric Temperature: 4000K
  • Accretion Ring Temperatura: 8000K
  • Mass Accretion Rate: 1e-8 Msun/Year
  • Mass Loss Rate: 1e-9 Msun/Year
  • Magnetospheric Inner and Outer Radius: 3.0 Rstar and 3.3 Rstar
  • Diskwind Inner and Outer Radius: 3.31 Rstar and 20.0 Rstar
The mass loss rate was calculated using the poloidal velocities in the base of the disk, and the densities in that region. The gas density that is used is a function of r and falls with r^(-1.5).

Obs: Just for you to remember. The intens.f have been changed to calculate only the continuum. I guess you will not forget that, but anyway...

Wednesday, February 20, 2008

Fortran and Fluxes Problems

In the last few weeks I have been working in this "Flux" code non-stop. I have been solving problems trying to make that code work with the output of my modified CV code for a little more than two months, and I still was not able to make it work properly.

Last week I found a problem, that I first thought was an interpolation problem, but it turned out to be something else. Actually, the problem was something that I have done wrong. When I tested the points through each of the rays to find if they were inside the wind region, I made a mistake. The wind has some geometric parameters, but to use those parameters I first have to made a change of variables, and I was not doing that, so my wind region was being calculated with wrong boundaries. And these wrong boundaries were the reason I had problems with the interpolation.

I recalculated the correct boundaries, the interpolation problems were solved, but still the code did not work properly.

After a while I noticed other thing wrong. My grid that should be a circular grid, was instead an elliptical grid. I solved that today. The grid is circular, but the results are far from the expected yet.

I am running out of ideas to solve the problems with this code... I have the feeling that my stellar flux is far too low compared with the magnetosphere and diskwind fluxes, but I don't know why, and that does not make much sense to me. The optical depths in the magnetospheric funnel seems to be right this time. But there is a weird red-shifted absorption feature in my profiles that does not match what I was expecting for the inclination I am using.

May the Radiative Tranfer and Fortran 77 Gods have mercy on my mind, and give me some inspiration to solve this... :P