[mesa-users] density partial
Francis Timmes
fxt44 at mac.com
Sun May 18 21:30:59 EDT 2014
hi ehsan,
> The term, e.g., in the numerator ∂P/∂T must be evaluated at constant mu and rho.
exactly. and the term in the denominator is evaluated at constant temperature and constant mu.
using the symbol “|" to show explicitly what is held constant.
d(rho)/dT |_{P,mu} = - ∂P/∂T |_{rho,mu} / ∂P/∂(rho) |_{T,mu}
this is a standard relationship you can find in stellar textbooks
and it is how you calculated it numerically (divide two partials).
mesa uses, as josiah notes, the chi_T and chi_rho formulation - same thing.
fxt
On May 18, 2014, at 3:59 PM, Ehsan Moravveji <e.moravveji at gmail.com> wrote:
> Thanks Josiah and Frank for your replies.
> The term, e.g., in the numerator ∂P/∂T must be evaluated at constant mu and rho. This is the definition of the differential of a multivariate function, say P(rho, T, mu) in this case.
> Then, I still do not know how to carry this out numerically.
>
> Best regards,
> Ehsan
>
>
>
> On May 18, 2014, at 2:35 AM, Francis Timmes wrote:
>
>> hi ehsan,
>>
>> dP = ∂P/∂T dT + ∂P/∂(rho) d(rho) + ∂P/∂(mu) d(mu)
>>
>> for constant pressure dP = 0 and constant composition d(mu) = 0,
>>
>> ∂P/∂T dT + ∂P/∂(rho) d(rho) = 0
>>
>> or
>>
>> d(rho)/dT = - ∂P/∂T / ∂P/∂(rho)
>>
>> these two partial derivatives should be readily available from an eos.
>>
>> fxt
>>
>>
>>
>> On May 17, 2014, at 3:27 PM, Josiah Schwab <jwschwab at berkeley.edu> wrote:
>>
>>> Hi Ehsan,
>>>
>>>> I need to calculate the partial derivative of density
>>>> w.r.t. temperature at constant pressure and constant mu. looking into
>>>> the public pointers in star_data.inc did not help me. Can any of you
>>>> kindly help me calculate that?
>>>
>>> The basic eos (see eos/public/eos_def.f), gives you
>>>
>>> ,----
>>> | integer, parameter :: i_chiRho = 5
>>> | ! dlnP_dlnRho at constant T
>>> | integer, parameter :: i_chiT = 6
>>> | ! dlnP_dlnT at constant Rho
>>> `----
>>>
>>> and then I think you can derive dlnRho_dlnT at constant P from those
>>> using an identity like
>>>
>>> http://en.wikipedia.org/wiki/Triple_product_rule
>>>
>>> Hope that helps,
>>> Josiah
>>>
>>> ------------------------------------------------------------------------------
>>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>>> Instantly run your Selenium tests across 300+ browser/OS combos.
>>> Get unparalleled scalability from the best Selenium testing platform available
>>> Simple to use. Nothing to install. Get started now for free."
>>> http://p.sf.net/sfu/SauceLabs
>>> _______________________________________________
>>> mesa-users mailing list
>>> mesa-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mesa-users
>>
>
More information about the Mesa-users
mailing list