Heat Regeneration in Dymola/Modelica - modelica

I want to build a system which consists of solar thermal collectors and ground source heat exchanger. I have a whole season weather data, which is connected with solar thermal collectors. I want to see how much heat will be released during the whole season from solar collectors to the ground by ground source heat exchanger respectively borehole, and the increased ground temperature by heat release.
Although I have the same number of unknowns and equations, the singularity error comes up.
Is there any missing process element?

The thermo-hydraulic part of your model needs a "ground" component to provide the reference pressure and enthalpy, since the heat exchanger components only describe changes in pressure/enthalpy.
You could use, e.g., a Modelica.Fluid.Sources.Boundary_pT, Modelica.Fluid.Sources.Boundary_ph or Buildings.Fluid.Storage.ExpansionVessel component for that.

Related

Modelica : Simulation of temperature rise in a cable - How to do?

I am a beginner on modelica. I wanted to transpose a model found on a paper (on internet) to a modelica model.
Here is the paper :
Insulated Cable Temperature Calculation and Numerical Simulation
I am stuck in rewritting the fomulas. Second derivative on a variable different of time --> i don't know how to do.
Another way I was thinking is to use the Thermal/HeatTransfer library. But here too, I don't know how to put the blocks togethers... I think this is due to a big lack in thermodynamic knowledge from my side.
--> I don't know what block to use to simulate the conductor and the insulation layer.
Maybe this is something too difficult ?
If someone has an idea on how to start, it will be a pleasure to read you :)
I tried to use the Thermal library :
Using heat transfert lib.
I have a current source and a resistance.
The resistance will change depending on the temperature involved by the current in the resistance.
I use 0.004 as alpha for the relationship R=R20*(1+alpha(T-Tamb)).
Let's say I have a 1 meter copper conductor with a crossSection of S=16mm² = 15.10^-6m²
then the initial resistance is R = rho.L/S ≃ 1.07mΩ at 20°C
Following this example of cable : Bayka 16mm²
To get 70°C at the surface of the conductor, then the max current for a single 16mm² wire cable is 107A in air, and 160A in earth.
I took, in my example, random value of thermal conductance and capacity to get an approximative temperature near the one given in the table (~70°C).
Is this model is the good one for an insulated cable ? (no considering values)
Or I forgot something? Maybe I am wrong in the position of the blocks ?
What do you think ?
Looks reasonable to me, might be easier to use the same component for heat conduction (heat resistor or heat conductance, not both) in order to be able to compare the two values. The mathematical formulas for radial heat conduction can be found here e.g. https://web2.clarkson.edu/projects/subramanian/ch330/notes/Conduction%20in%20the%20Cylindrical%20Geometry.pdf

Error: "The model is structurally singular" Dymola Modelica Solar thermal coupled with hot water tank and floor heating

Here what I am doing is that using the weather data as input parameter, if the global radiation is higher than 100 W/m^2 open the valve. First solar heat will be released to the hot water tank, and then the heat will be given to the Boundry_pT via heat exchanger. I want to see, how the temperature of Boundry_pt changes resp. time.
I also want to use water as Medium in the internal heat exchanger. For that I edited the text box in Medium in the heat exchanger, as Buildings_Media_Water. Is it correct? Otherweise how can I choose water as a medium in the internal heat exchanger?
It seems that you have two separate fluid-circuits, and you only have one expansion tank (the "exp" component - sorry if I don't have the right terminology).
That means that the flow becomes over-determined in the 2nd circuit - and the pressure under-determined. There are a number of ways of handling it - including adding an expansion tank.

How to specify medium in Openmodelica?

I am simulating a heat pump water heating system in Modelica. I have attached the picture of my model. However, when I run the model I get the error "Medium is partial, name lookup is not allowed in partial classes". Can you please let me know:
How should I specify the water in tank, heat pump condenser and pipe?
How should I specify air in heat pump evaporator?
And in general, I did not find any example of modeling thermal systems in Openmodelica, can you suggest a source?
Thanks

Pressure drop in Modelica.Fluid.Pipes.DynamicPipe when dynamic momentum balance is taken into account

I have a problem in understanding the simulation results of a discretized Modelica.Fluid.Pipes.DynamicPipe when using a compressible gas as medium and taking the dynamic momentum balance into account.
To illustrate that I built up a very simple model: pressure source + pipe + pressure sink. The pressure in the pressure source is linearly increased over time. The parameterization of the pipe mainly corresponds to the default values, but the parameter "momentumDynamics" is set to "Modelica.Fluid.Types.Dynamics.FixedInitial".
For lower gas velocities (=smaller inlet pressures) the pressure drop is somehow nearly linear distributed over the discrete elements of the pipe (of course the pressure drop is not the same in every element due to the change in medium properties). As the gas velocity gets higher however, the pressure drop in the last flow model (= resistive element) is dominating by far. The picture below showes the pressures in the different flow models along the pipe. The pressure in the last flow model (green dashed line) corresponds to the constant pressure in the pressure sink.
Actually when looking at the pressure distribution along the pipe it looks as if the pipe was choking. This is however not possible since the velocities are still far below the velocity of sound. The velocity in the last flow model is a lot higher than in the rest of the pipe, because the pressure is a lot lower, since it corresponds to atmospheric pressure. This picture below shows the velocity in the flow models in the pipes as well as the velocities of sound. The velocities of sound are nearly constant at ~330 m/s.
What I do not understand:
Does the simulation result represents the physics correctly? If no, where is the "error" in the equations? If yes, what is the the physical behavior which the model represents here?
What I've tried:
Changing the discretization of the pipe does not change the phenomenom.
It seems to be independent of the medium model, I've also tried it with quite different medium models for compressible gas. (This example shown is using Modelica.Media.Air.ReferenceAir.Air_ph)
It only occurs if the dynamic momentum balance is chosen (since despite the name of this flag, using this flag not only "activates" the dynamic term in the momentum balance but also adds the pressure loss due to acceleration).
I'm looking forward to any hints to explain this issue!

May i know how to design the 3 phase converter for BLDC motor with Sinusoidal Commutation?

I have designed a BLDC motor model with Hall Sensors using simulink. It is working perfect with Trapezoidal commutation,with perfect trapezoidal back emf but when i go for sinusoidal commutation, the Hall sensors seem not to detect the electrical angle sequences. I want to know how to generate the three phase input voltages for driving the sinusoidally commutated bldc motor.Presently i am going with sensing the electrical angle using hall sensors and changing the hall state at every 60 degrees and switching the corresponding switches, but this somehow doesn't seem to work. I suppose i have to work on something like using a PWM signal or something. Please help me out.
BLDC motor applications have increased significantly in recent years as energy efficiency, durability, and maintenance-free operation have become increasingly valued. Motor control designers are using the performance characteristics inherent to BLDC motors, giving them a distinct advantage over common ac induction and brushed dc motors used in similar applications.
three phase power converter can be done as designers can simply choose the appropriate control algorithm and then concentrate on developing and evaluating their own target applications...