40 Reputation

3 Badges

8 years, 209 days

MaplePrimes Activity

These are replies submitted by rquirt

On a related note, I thought I would use the modelica editor to create my component.  When I opened the Library Components->Thermal->FluidHeatFlow->Components, I discovered a few more components than in Maplesim: cylinder, OneWayValve and OpenTank.  Why aren't they available in MapleSim?

@Joe Riel Thanks for your help.

I now get this error.

When I assign the ports there is no temperature.

I have attached the file.



I missed the MapleFlow webinar.  Is it going to be released as a recorded webinar?

Thank you for your help.  It works great.

I did a little experimentation and found that both fsolve and plot only work with the proc if a function was defined in their calling sequence as shown below.  So in order to avoid this issue in the future is there a simple way to trap the error within the proc or do you just have to use the explicit function definiton in the function call? 

Thank you for your help.

the basics would be like this where:

n - current step

u(n) - input

out(n) - output

Do_Not_Increase -an input that stops the output from increasing

Do_Not _Decrease - an input that stops the output from decreasing


Executed at an interval dt

out(n) := out(n-1) + k*(u(n) - u(n-1)) + k/Ti*(u(n))

if Do_Not_Increase and out(n) > out(n-1) then
  out(n) := out(n-1);

if Do_Not_Decrease and out(n) < out(n-1) then
  out(n) := out(n-1);


Thanks for any help you can give me.

@Joe Riel 

Thanks that worked perfrectly.

I was not able to find any documentation on the fully qualified name for the modelica port on my last post.  Is that documented somewhere?


Thanks again.

@Joe Riel 

Super, thank you very much.

@acer Thankyou for all of your help.


@acer Sorry I am new to Maple and to the MaplePrimes.  I have uploaded the file now.  Did I do that correctly?

Download fsolve_Test_for_MapleSoft.mw

@acer Thanks again for your help.  I just saw the little up-arrow for uploading a file.  I was looking in the wrong place before.


Thanks very much for your help.

I did notice that you used Units[Simple] not Units[Standard] as I had. When I switch to Units[Standard] the fsolve gives the following result:

fsolve(100*Unit('W')-conv_VerticalPlate_proc(x, 20*Unit('degC'), Unit('m'^2), Unit('m'), .9), x = 10*Unit('degC') .. 100*Unit('degC'));
Error, (in Units:-Standard:-+) the units `W` and `1` have incompatible dimensions

It appears that there is more stringent consistency checking in the Standard library but is it recommended to use the Simple library rather than the Standard library?


@Samir Khan 

First thanks for adding units to fsolve and for providing the example with units.

With Units[Simple] this example works however if I change it to Units[Standard] it does not.  But if I want to use degC and I use the Standard Units Package I can get the Property functions to work but then fsolve stops working and produces an error.

I seem to only be able to get fsolve to work with units by using the Simple units package.  This requires me to use the convert function to convert degC to kelvin to get the Property functions to work.

Can fsolve only handle units if you use the Simple package or am I doing something wrong?



Page 1 of 1