Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Re: Functional Expression for Density from Beattie Bridgeman Equation

$
0
0

You have defined the Pressure function above the Given ... Find solve block, so there is no need to define it again within the block.  All we are doing is making sure it equates to the specified value, Pin.

 

The solve block uses an iterative method to find density, so it needs a starting value.  This is the value of 1 kg/m^3 defined immediately above the word Given.  Here, the same initial value is used whatever the conditions you are considering; however, this is probably ok for your application.  If this restriction causes problems you could include the initial guess as an input argument to the function (but then you would need to call rho with rho(initial rho, T,P)

 

Basically, the solve block uses the intial value of rho and the input Temperature to calculate P(T,1/rho).  It then compares this value with the input pressure, Pin.  If they agree (to within a tolerance) then the block returns that value of rho.  if it doesn't agree, it changes the value of rho and tries again.  It repeats this process until it gets agreement.

 

Alan


Viewing all articles
Browse latest Browse all 12488

Trending Articles