Guidance on Derivatives for Concentration-Based Density Equation #26753
Replies: 2 comments 4 replies
-
Hi @burritotukituki You should have a look into PorousFlowMulticomponentFluid Those objects call FluidProperties including a concentration variable. You can follow their structure and the structure in BrineFluidProperties to create your own FluidProperties object. |
Beta Was this translation helpful? Give feedback.
-
Hi @1runer, I've been delving into how these fluid properties function. From what I've gathered, it seems I need to create a C++ object similar to BrineFluidProperties.C. Within this object, there's a function called rho_from_p_T_X, which appears to be what I need... Now, I can take this function as a starting point to develop my own. Water density is determined by rho_from_p_T, while the brine density is calculated by scaling the water density with the ratio of brine molar mass to pure water molar mass. So, by modifying the brine density function and tailoring it to my requirements, it should work, right? |
Beta Was this translation helpful? Give feedback.
-
I'm currently in the process of developing my own PorousFlow material and aiming to incorporate a concentration-based density equation for water. Initially, I'm considering a straightforward relation:
ρ=1000+0.001×C
Where 1000 represents the density of pure water, and C denotes concentration. However, I'm encountering difficulties in accurately determining the derivatives, I am using as a base PorousFlowSingleComponentFluid.C, and looks like there the derivatives are computed by an external function... Could someone provide guidance on how the derivatives should be computed?
to the code
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions