Application Center - Maplesoft

App Preview:

Calculating the Bulk Modulus of a Fluid

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application

Calculating the Bulk Modulus of a Fluid


ThermophyiscalData:-Property will compute the properties of fluids; these properties include density, enthalpy, viscosity and more.


However, some  properties are not computable out-of-the box; these include the isothermal bulk modulus a fluid. Bulk modulus is defined as

K = rho*(diff(P(rho), rho))

So to compute the bulk modulus we need to calculate the


fluid density


and the numeric derivative of pressure with respect to density (at constant temperature).


This procedure accepts a temperature, pressure and fluid, and calculates the bulk modulus. Numerical derivatives are computed with fdiff .



BulkModulus := proc(temp, press, fluid)

   local rho:
   uses ThermophysicalData:

   rho:=Property(density, temperature = temp, pressure = press, fluid);
   return rho*fdiff(Property(P, density = D, temperature = temp, fluid), D = rho);

end proc:

Hence the bulk modulus of water at 20°C and 1 atm is

BulkModulus(293.15, 101325, water)



This value closely matches that given by miniREFPROP , as illustrated in the screengrab below


This plot demonstrates that the bulk modulus of water is at a maximum when the temperature is about 320 K

plot(('BulkModulus')(temp, 101325, water), temp = 310 .. 330, background = ColorTools:-Color("RGB", [218/255, 223/255, 225*(1/255)]), axis = [gridlines = [color = ColorTools:-Color("RGB", [1, 1, 1])]], size = [800, 500])