[mesa-users] Using other_wind.f

Bill Paxton paxton at kitp.ucsb.edu
Sat Jan 5 21:54:30 EST 2013


Hi Jieun,

I don't pass the pointer "s" as an argument to the other_wind routine for various technical reasons.
But the "id" argument let's you get what you need.   It works like this:

	subroutine other_example(id, ierr)
		use star_def
		integer, intent(in) :: id
		integer, intent(out) :: ierr

		 type (star_info), pointer :: s

		 ierr = 0
		 call star_ptr(id, s, ierr)
		 if (ierr /= 0) return
	
		/* now you can use s to access whatever you need */
	
	....


Cheers,
Bill





On Jan 5, 2013, at 6:24 PM, Jieun Choi wrote:

> Hi everyone,
> 
> I'm experimenting with a different wind scheme which ties the regular Blöcker wind to an exponential factor involving the envelope mass. However, it seems like MESA only allows you to access Lsurf, Msurf, Rsurf, and Tsurf instead of the full star_info structure (from which I'd get the envelope mass). Is there some way to get around this?
> 
> other_wind is called in winds.f using
> 
> else if (scheme == 'other') then
>     if (dbg) write(*,*) 'call other_wind'
>     call s% other_wind(s% id, L1, M1, R1, T1, wind, ierr)
>     if (ierr /= 0) return
> 
> and I copied the following from other_wind.f to use as a template in run_star_extras.f
> 
>       subroutine null_other_wind(id, Lsurf, Msurf, Rsurf, Tsurf, w, ierr)
>          use star_def
>          integer, intent(in) :: id
>          real(dp), intent(in) :: Lsurf, Msurf, Rsurf, Tsurf ! surface values (cgs)
>          ! NOTE: surface is outermost cell. not necessarily at photosphere.
>          ! NOTE: don't assume that vars are set at this point.
>          ! so if you want values other than those given as args,
>          ! you should use values from s% xh(:,:) and s% xa(:,:) only.
>          ! rather than things like s% Teff or s% lnT(:) which have not been set yet.
>          real(dp), intent(out) :: w ! wind in units of Msun/year (value is >= 0)
>          integer, intent(out) :: ierr
>          w = 0
>          ierr = 0
>       end subroutine null_other_wind
>  
> Thanks,
> Jieun
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_123012_______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20130105/ceae0bda/attachment.html>


More information about the Mesa-users mailing list