# Passive Scalars

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 15, 2004, 07:03 Passive Scalars #1 CMB Guest   Posts: n/a Hi, If you define a passive scalar, e.g. scalar(x) and it is to be calculated in any subroutine via a variable 'y'. How do you define that you want the value of y to be scalar(x). So after doing this you can then post process it? I'll appreciate any help, thanks

 January 15, 2004, 08:23 Re: Passive Scalars #2 Ossi Guest   Posts: n/a You can define the scalar value e.g. in the sorsca.f subroutine. You can write if(IS.EQ.xx)then where xx is the defined passive scalar. Then you can write S1P=Large_number(like 1E+25) times "y" S2P=Large_number After this, the scalar xx has the value "y".

 January 15, 2004, 09:27 Re: Passive Scalars #3 alex Guest   Posts: n/a Not sure I follow Ossi's example. I would use the subroutine "scalfn". In scalfn, do the following; if (is.eq.x) then C where x is the scalar number phi = y end if This routine is called for every cell and will put the value "y" into scalar "x", which can be post processed in prostar by; load,, getc conc x