Code Example for a Simscape Fluids Componenet based on characteristic curves.
7 views (last 30 days)
Show older comments
Most hydraulic components in Simscape Fluids are modeled by physical equations which need parameters like areas for valves for instance. However, the acuuracy of the description of real components by these simple models is questionable and parameters like the orifice area of a valve are not provided by the manufacturers.
However, what is often provided by the manufacturers are fields of characteristic curves, e.g. pressure vs. flow rate diagramms. Furthermore, these are measured values and hence they should describe the real component very well.
Concerning this, my idea is to create own Simscape Fluid components that are not based on physical relations represented by mathematical formulas, but on characteristic curves and interpolated values.
Although I have some MATLAB experiences, I'm new to simscape. My search for instruction that can help me to relize my idea failed.
Because lerning is easiest on examples, I figured out the following simple problem: I want to create a Simscape Fluids component representing a valve described by a characteristic curve represented by the pressure vector p=[0 1 2 3 4] and the flow rate vector q=[0 1 4 9 16]. The block should have no parameters, and two hydraulic nodes.
Can anyone post the solution of this example (whole code)?
Thanks a lot
F. Kraemer
0 Comments
Answers (1)
Steve Miller
on 28 Nov 2017
There is a block in Simscape Fluids that has exactly the parameters you wish to specify: Fixed Orifice Empirical
If you wish to create a component that fits your needs exactly (no parameters), the Simscape Language function you need is tablelookup. A good starting point is the source code for the Linear Hydraulic Resistance block and the PS Lookup Table 1D block.
--Steve
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!