How can I set up the lookup table for a 2-way directional valve?
Show older comments
I need help with why I am getting this error "Dimensions of arrays being concatenated are not consistent. "
I am trying to model a 2-Way Driectional Valve using lookup tables.
4 Comments
This error happens when you try to concatenate arrays that can't be concatenated. For instance, trying to vertically concatenate arrays with different numbers of columns, or trying to horizontally concatenate arrays with different numbers of rows.
x = [1 2 3];
y = [4 5 6];
% vertically concatenate x and y -> works
% because x and y have the same number of columns
z = [x; y]
x = [1 2 3];
y = [4 5 6; ...
7 8 9];
% vertically concatenate x and y -> works
% because x and y have the same number of columns
z = [x; y]
x = [1 2 3];
y = [4 5 6 7];
% vertically concatenate x and y -> does not work
% because x and y do not have the same number of columns
z = [x; y]
For more specific help, please post the relevant code.
Andrews Kwkaye
on 14 Apr 2022
Voss
on 14 Apr 2022
No idea, sorry. Apparently that's some stuff from Simscape, which I've never used.
Andrews Kwkaye
on 14 Apr 2022
Answers (1)
Yifeng Tang
on 24 Jun 2022
0 votes
Regarding the error message in you comment:
- ['Trial/2-Way Directional Valve (IL)']: Size of Volumetric flow rate table, q(s,dp) must be equal to length of Spool travel vector, s by length of Pressure drop vector, dp. In fluids.isothermal_liquid.valves_orifices.directional_control_valves.directional_valve_2_way
It's complaining about size(q) is not the save as [length(s),length(dp)]. q is what you have put in the volumetric flow rate table, and s is the spool travel vector, and dp is the pressure drop vector. The dimensions have to be right, or Simscape doesn't know how to do the look up.
Categories
Find more on Thermal Liquid in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!