Equivalent Systems for the Conical Poppet Valve
This example shows how to create equivalent models for the Conical Poppet Valve either as a composite component, using equations written in the Simscape language, or by connecting multiple blocks on the Simscape canvas.
This example is third and last example in the series that starts with the Pressure Relief Valve in the Position-Based Translational Domain example. The first example introduces the position-based pressure relief valve. The second example, the Modeling the Spring in Chamber with Composite Components in the Position-Based Translational Domain example, shows how the Spring in Chamber block can be broken down into subcomponents and modeled equivalently.
Conical Poppet Valve vs Equivalent System: Positional Orifice
The figure below shows the Conical Poppet Valve block on the left and an equivalent composite component of the system the right. The composite component uses position-based translational Mass, Hard Stop, Spacer, and World blocks. The position-based Orifice block is a modified version of the Orifice (IL) block and uses position-based translational ports for the orifice opening distance, instead of a PS input signal. The position-based Orifice block calculates the fluid force based on the orifice geometry.
Run the model for the two variants and compares the results.
model = 'PositionBasedPressureReliefValveComponentization'; variant = [model '/Conical Poppet Valve']; open_system(model); % Set Model Variant to "Composite" set_param(variant, 'OverrideUsingVariant', 'Composite') % Set the Simlog output name and run the model for the Composite case set_param(model,'SimscapeLogName','simlog_Composite'); sim('PositionBasedPressureReliefValveComponentization'); % Set Model Variant to "Position-Based Orifice" set_param(variant, 'OverrideUsingVariant', 'PositionBasedOrifice') % Set the Simlog output name and run the model for the Position-Based % Orifice case set_param(model,'SimscapeLogName','simlog_PositionBasedOrifice') sim('PositionBasedPressureReliefValveComponentization');
% Close existing figures to reset axes for livescript use close all; % Plot the composite variant results PositionBasedPressureReliefValveComponentizationPlotComparison('Composite'); PositionBasedPressureReliefValveComponentizationPlotComparison('PositionBasedOrifice'); figure(h1_PositionBasedPressureReliefValveComponentization); nexttile(1) legend('Composite','Position-Based Orifice','location','southeast'); nexttile(2) legend('Composite','Position-Based Orifice','location','southeast');
The two implementations return identical results.
% Restore defaults set_param(model,'SimscapeLogName','simlog_PositionBasedPressureReliefValveComponentization') set_param(variant, 'OverrideUsingVariant', 'Composite')
Conical Poppet Valve vs Equivalent System: Recreated Equations
The third equivalent system in this example uses the unmodified Orifice (IL) block. This variant uses PS signals to perform the force calculations that the position-based Orifice performed internally in the previous variant. The PS force signal is an input to the Actuator block which applies the force to the Position-Based Translational network. The model canvas complexity illustrates the advantages of implementing similar modeling situations within a Simscape component instead.
This figure shows the Fluid Force Calculations subsystem.
This code runs the model in the equivalent system variant and compares the result to the composite variant results.
% Set Model Variant to "Equivalent System" set_param(variant, 'OverrideUsingVariant', 'EquivalentSystem') % Set the Simlog output name and run the model for the Equivalent System % case set_param(model,'SimscapeLogName','simlog_EquivalentSystem') sim('PositionBasedPressureReliefValveComponentization');
% Close existing figures to reset axes for livescript use close all; % Plot the Composite variant results PositionBasedPressureReliefValveComponentizationPlotComparison('Composite'); PositionBasedPressureReliefValveComponentizationPlotComparison('EquivalentSystem'); figure(h1_PositionBasedPressureReliefValveComponentization); nexttile(1) legend('Composite','Equivalent System','location','southeast'); nexttile(2) legend('Composite','Equivalent System','location','southeast');
The slight differences between these results is because the Conical Poppet Valve and the modified Orifice block perform numerical smoothing calculations, but the recreated equations model does not.
% Restore defaults set_param(model,'SimscapeLogName','simlog_PositionBasedPressureReliefValveComponentization') set_param(variant,'OverrideUsingVariant', 'Composite')
Summary
Composite components can substantially reduce canvas complexity.
The position-based valve library natively couples the translational and isothermal liquid behaviors. In the non-position-based mechanical domains coupling with the isothermal domain can require both sensors and sources.