## 120 Reputation

16 years, 159 days

## ODE Plotting problem...

Dear Community,

I try to slove a simple 2nd order ODE describing a simple pulley. Unfortunately dsolve does not like what I'm trying to do, and I get en error message. My goal is to plot travel distance, velocity and acceleration (  h(t), dh(t)/dt, d2h(t)/dt2 ) of the lifted weight. Could you pls. have a look what I'm doing wrong?

Also is there a way to transform this worksheet to a MapleSim document somehow? Worksheet attached.

best regards

Andras

SimplePulley.mw

## How to correctly specify events in dsolv...

Maple 2020

Dear Community,

I try to solve a simple flow problem between two fluid tanks. They are connected with a pipe and a pump. Simulation runs from 0s to 3000s. Fluid levels are H1(t), H2(t), and flow rate between the tanks is Q1(t). I operate the pump between 500s and 2000s, with a constant head, and after that I would like to shut down the system from 2000s to 2500s (i.e. for 500s Q1(t) should be 0, and consequently H1, H2 remain constant) and then reopen it again, so tanks can equilibrate. I've attached the worksheet (FlowProblem.mw).

I tried to achieve this in the event section of dsolve (indicated in red), but it seemingly did not work out. So my question is: how to correctly specify it in dsolve, so flow (Q1) remains 0. between 2000s and 2500s, and can flow again afterwards? Am I right to do it in dsolve, or is there any other way to do it?

best regards

Andras

FlowProblem.mw

## How to export Voronoi cell cornerpoint c...

Maple

Dear Community,

Maple has the fancy VoronoiDiagram command, which generates Voronoi grids from a set of 2D distributed points. Does somebody know how the cornerpoint coordinates of the individual Voronoi cells  of the obtained Voronoi grid can be exported as a list of (xi, yi)  coordinate pairs? Could you possibly give a simple example?

Andras

## How to numerically solve a system of lin...

Maple 2019

Dear Community,

I have a four compartment flow model described with the following system of linear ODEs:

diff(L[1](t), t) = L[2](t)/T[21] - L[1](t)/T[12]

diff(L[2](t), t) = L[1](t)/T[12] - L[2](t)/T[21] + L[3](t)/T[32] - L[2](t)/T[23] + Q(t)

diff(L[3](t), t) = L[2](t)/T[23] - L[3](t)/T[32] + L[4](t)/T[43] - L[3](t)/T[34]

diff(L[4](t), t) = L[3](t)/T[34] - L[4](t)/T[43]

(For easier readability I’ve also described the problem in the attached FourCompartmentModelDescription.docx Word file.)

The time constants are as follows:

T12 = 23.1481 d

T21 = 5.4537 d

T23 =  9.752 d

T32 = 14.9007 d

T34 = 8.8235 d

T43 = 363.7255 d

Initial conditions are as follows:

L1(0) = 2500.

L2(0) = 589.

L3(0) = 900.

L4(0) = 37100.

Simulation should run from 0 to 400 d.

Could you pls. help me, to solve it numerically in Maple? As a solution I would need L1(t), L2(t), L3(t) and L4(t) both numerically and graphically. I used Maple to solve ODEs previously, but this time I don’t know, how to correctly specify the problem with an external, tabulated source. I’ve also prepared and attached a Maple worksheet, but did not try to run it yet. (FourCompartments.mw). The external Q(t) source for compartment 2 is attached as Source.xlsx. Should I've forgotten something, pls. let me know.

best regards

Andras

MaplePrimesFourCompartmentModelDescription.docx

FourCompartments.mw

Source.xlsx

## How to inverse interpolate a 2D lookup t...

Dear Community,

I would like to have an inverse interpolation with a 2D lookup table in MapleSim. The usual 2D lookup interpolation has u1 column values, and u2 row values, and a corresponding   y   table values, i.e. y = f(u1,u2). Now I would like to go the reverse way. Suppose I know y, and u2, and I would like to get u1. How can I implement this in MapleSim? An additional information is, that the 3D surface represented by the f(u1, u2) function is a smooth, slightly curved, monotonically sloping surface, so to any  y  value a unique pair of u1 and u2 values belong.

With my specific data, which are attached in the TestVLP.xlsx file:

• u2 values are: 1st row, cells 2 .. 14
• u1 values are  1st column, rows 2 .. 11
• tabulated values are all the rest, i.e. from cell(2,2) .. cell(11,14)

Now for my case:

• u2 = 42000.0
• y   = 94.5614

How much is u1? I know the correct answer from elsewhere, it should be something very close to u1 ~ 85. This  y  value is in the rectangle bordered by columns 7 .. 8  and rows 5 .. 6 in the Excel file.

So my question is how do I correctly implement this in MapleSim? As visible from the attached TestInverse2DInterpolation.msim file I tried to do it with an Inverse Block Constraints component and a horizontally flipped 2D Lookup Table (VLP) and Constants for y and u2, but upon running MapleSim I get an error message that no solution is found, although the solution is relatively easy and straightforward. May I ask you to have a look at it, what can be the problem here, what do I do wrong? I’m using MapleSim 2019.2.