Currently, I'm working on designing a turbine with a steady power output that will draw air from a storage tank ( 50 bar, 500C). With constant power generation planned, the mass intake should change in response to the power.
I require the model in calculating the mass flow rate that is drawn from the storage container.
Could you please assist me?
model TestTurbine
Turbine turbine(redeclare package Medium = CAES.DryAirNasa)
annotation (Placement(transformation(extent={{-12,-10},{8,10}})));
Modelica.Fluid.Sources.Boundary_pT boundary(
redeclare package Medium = CAES.DryAirNasa,
p=101325,
T=298.15,
nPorts=1) annotation (Placement(transformation(extent={{16,-54},{36,-34}})));
Volumes.Volume volume(
redeclare package Medium = Modelica.Media.Air.DryAirNasa,
V=20,
p_start=5000000,
T_start=773.15)
annotation (Placement(transformation(extent={{-84,-4},{-64,16}})));
equation
connect(boundary.ports[1], turbine.port_b) annotation (Line(points={{36,-44},{
40,-44},{40,0},{8,0}}, color={0,127,255}));
connect(volume.In, turbine.port_a) annotation (Line(points={{-83.2,6},{-88,6},
{-88,-8},{-18,-8},{-18,-0.2},{-12,-0.2}}, color={0,127,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end TestTurbine;
Related
I have imported Cad models of a mechanical system to Simscape multibody.
I need to reflect the effect of some physical parameters (like temperature, pressure...) on the surface of the parts of the system, such that their color changes according to the level of the parameter.
Are there any specific methods that could help me to achieve this step?
As you can see the figure, I gave outlet boundary condition as 20 bar. Actually I want the compressor to calculate the pressure outlet by using pressure ratio.
Can we model a system using fluid libray without outlet boundary condition?
If you just remove sinkP the system will be underdetermined — you'll miss one boundary value. Since the compressor models describe the relationship between pressure difference and mass flow rate you must specify the mass flow rate if you want the model to calculte the outlet pressure. To do so, use a mass flow rate/enthalpy (or temperature) as outlet boundary component instead of sinkP. Remember to specify a negative mass flow rate.
Im simulating a swing door with generator using Simscape/Simulink. I imagine there is only one input for system which is the force at the knob needed to open the door, so all revolute joints have their torque actuation set to automatically computed. However, im getting an error saying:
"In the dynamically coupled component containing Revolute Joint 'SDL/SwingMotion', there are more joint primitive degrees of freedom with automatically computed force or torque (4) than with motion from inputs (0). In general, the equations of motion do not have a unique solution. Solve this problem by increasing the number of joint primitives with motion from inputs or reducing the number of joint primitives with automatically computed force or torque. Resolve this issue in order to simulate the model."
The animation works fine if i set the torque actuation of all 4 revolute joints to none, but the torque produced by the force wont be transfered this way and the generator shaft wont have any torque. However, I am able to measure the output RPM (angular velocity of generator shaft). I dont quite understand the error. Why do the revolute block treats the degree of motion of other revolute blocks as its own? How do i resolve this?
Block Diagram can be seen here.
The Assembly looks like this:
Any help is much appreciated!
For a revolute joint there are three options:
Let the revolute joint just act as a hinge, no torque can be exerted from base to follower and vice versa
Provide torque and calculate motion from the torque. This is called forward dynamics, motion is determined from torque.
Provide motion and calculate torque from the motion. This is called inverse dynamics, torque is determined from motion.
So you have to select either one of the option. If you select torque automatically computed, then you need to provide the motion which it has to follow. If you don't need to follow a provided motion, than no torque is needed.
If you set torque computed to 'none', then there is no torque that can be exerted from the base to the follower and vice versa, that is the idea of a Degree of Freedom.
It seems as if you want the Base and the Follower to be somewhat rigidly connected and follow the same motion. Than you can consider using the Rigid Transform block, which is just a rigid link in which you can define a translation or rotation offset.
EDIT
What you were effectively doing was combining forward and inverse dynamics. You put a force on the doorknob, let Simulink calculate the motion (up till now forward dynamics) then you desire the torque on the GenShaft from the motion it is doing, which is inverse dynamics. That does not work.
A better way to check the torque on the GenShaft is to, for instance, desire a certain door hinge angular velocity, put a proportional controller on it, and check the required torque. Notice that with no friction modeled in the hinge the required torque will go to zero.
So if you set all torque computed to 'none' except for the GenShaft, set this to provided by input. Then put a proportional controller on the angular velocity of the door hinge. You can then check the torque needed.
Updated model
I am currently designing a Simscape Multibody model of my drone. My drone is a three-armed device, which somewhat resembles the rotors of a helicopter.
The drone is supposed to rotate around itself, using a motor on each arm. Furthermore, each arm will have a wing attached to produce the lift required.
The initial purpose will be to control the RPMs of the motors as well as the pitch of the wings.
Currently I have a model without the wings, so I am looking for a way to model wings that do have some aerodynamic properties, that would be able to create some force upwards (lift) from the spinning motion.
How can I integrate wings (or other forms of artificial lift) in to my model?
3D Model of the drone with motors (generated from Simulink)
You have several options:
A) Use Aerospace Blockset for ready-to-use aerodynamic forces
B) Compute your own simplified aerodynamic forces (with Simscape Physical-Signal blocks or Simulink blocks) based on relative orientation, cross-sectional area and speed of your solid wrt the air.
Both options would require sensing the relative orientation and speed of the drone, using the sensing option on the 6-DOF Joint.
Here's an example of using Simscape Multibody together with Aerospace Blockset, but for ground vehicles.
Background:
A river has a non-constant cross-section. Under standard conditions, the water level amounts h_Std (see figure below).
As it begins to rain, the water level rises until it is equal to h_Rain (see figure below)
After the rain stops, the water level decreases back to the standard water level.
As one can see from the diagrams, the relation between water level and volume is non-constant. However, the function can be desribed mathematically and is known for my particular cross-section of the river.
Problem description:
I want to simulate the water level of the river over time in case of raining. The rain is represented by an signal which can either be 0 (not raining) or 1 (raining) (see red curve in figure below):
The dark-blue parts of the lower diagram are nonlinear and represents the section between h_Std and h_Rain from the diagrams above. The time for completly filling the river is known (t_Fill).
Generaly spoken, I want to activate an user-defined function (in my case the relation between the amount of water / rain and the water level of the river) triggered by an external signal (in my case represented by the "rain"-signal).
How can I obtain such a function (either with a piece of Matlab-Code oder with Simulink blocks)?
There are several ways this could be done, one of which is to use enabled subsystems to process the raining and not raining phases. You'd need to change the contents of the 2 subsystems below to reflect your exact height profile in the 2 regions.