Message Boards Message Boards

0
|
13782 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to implement an exponential function block in System Modeler?

Posted 11 years ago
This might be a dumb question but I've spent a few hours trying to figure it out and I'm getting a bit frustrated.

I am trying to implement a convection block as part of a heat loss model for an insulated tank.

The forced convection coefficient is based on a table of windspeed data and each time step has a different windspeed value that needs to be raised to the 0.78 power (v^0.78).
I can't figure out how to implement this.
There is a base e exponential function and log blocks but no defineable exponential block....

Am I missing something?
POSTED BY: nathan curry
2 Replies
Posted 11 years ago
Thanks so much for the response.

This is exactly what I needed.
POSTED BY: nathan curry
@Nathan, 

You can use the command line interface to create such a block by yourself. 


The output is 

The myExp model can be defined as 
model myExp
  Modelica.Blocks.Interfaces.RealOutput y ;
  Modelica.Blocks.Interfaces.RealInput u ;
equation
  y=u^0.78;
end myExp;
Both "Modelica.Blocks.Interfaces.RealOutput" and "Modelica.Blocks.Interfaces.RealInput" can be created by drag and drop in from the class viewer. 
Once you have the blocks in the screenshot above, you can extend your blocks and connect it to build-in models in the library:


Here I replace the input with a periodic impulsive signal (low 10 and high 40 m/s of wind speed).   The plot on the right handside of the picture above indicates that the actual heat flow does see the change in the input wind speed. 

You can download the example from my github -> Thermal1.zip.
POSTED BY: Shenghui Yang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract