C_R

3412 Reputation

21 Badges

5 years, 313 days

MaplePrimes Activity


These are answers submitted by C_R

Add this to your worksheet

EQlist := [eq10, eq11, eq12, eq13, eq14, eq15, eq16]:
{seq(i = op(0, i), i in indets(%, function(identical(t))))};
subs(%, EQlist);

The line in the middle creates a replacement set for any set of equations.

Taking x<=y and y<=z as the two inequaltities the region inside the cube looks like this

Here I have only added two equations to Kitonums answer for the cube

plots:-implicitplot3d(max(x - y, -y + z, -x, x - 1, -y, y - 1, -z, z - 1), x = -0.5 .. 1.5, y = -0.5 .. 1.5, z = -0.5 .. 1.5, style = surface, shading = z, axes = normal, grid = [100, 100, 100]);

Update:

I made a sign error in the above plot command. It should be

plots:-implicitplot3d(max(x - y, y - z, -x, x - 1, -y, y - 1, -z, z - 1), x = -0.5 .. 1.5, y = -0.5 .. 1.5, z = -0.5 .. 1.5, style = surface, shading = z, axes = normal, grid = [100, 100, 100])

The ployhedron above only has 4 surfaces. Therefore 4 inequalties are sufficient.

0 <= x and z <= 1 and x <= y and y <= z
plots:-implicitplot3d(max(x - y, y - z, -x, z - 1), x = -0.5 .. 1.5, y = -0.5 .. 1.5, z = -0.5 .. 1.5, style = surface, shading = z, axes = normal, grid = [100, 100, 100]);

The forget command can be used to clear remember tables and therefore free memory.

You could try it within the loop before the next iteration.

Its not fully clear what you want to achieve. Partly because your model does not simulate, and so the result window does not show the structure of your assembly.

However, I can give some recommendations:

  • Make yourself familiar with the flexible beam component with simple cases. It’s a sophisticated component with many parameters that must be set correctly. I have attached double-sided clamped beams which can serve as a first building block to simulate an over-constrained structure.
  • Try to model one rail before adding the second rail.
  • Instead of using the flexible beam frame component use several flexible beam components. I.e. wherever you add a support (a sleeper) or a force, split the flexible beam in two parts. This makes life easier, and a better approximation can be achieved with overall fewer elastic coordinates (see next bullet point).
  • Pay attention to the elastic coordinates. For an over-constrained structure, you need higher numbers. EC=1 won’t work for your problem (and also not for the attached models). Set also elastic coordinates to zero that you do not need to speed up calculation.
  • Make sure that the profile of the rail is correctly oriented to the coordinate frames you use.
  • Each time you increase the complexity of your model save a version.

I hope this helps

 

Double_sided_clamped_beam.msim

Double_sided_clamped_beam_with_prismatic_joint.msim

If your question is about designing a block diagram:

To model something in MapleSim, you need a design or concept. Do you have something like that?

If so, then each (essential) functional element has to be represented by MapleSim components. These components could be referred to as blocks but they are special in the sense that connections between components do not have arrows (the components are acausal).

If you really want a block diagram with arrows like in Simulink you have to use MapleSims Signal Blocks (but then you miss out the simplicity of physical modeling with MapleSim).

If your question is about importing existing block diagrams:

Here is a recent post on MapleSim BlockImporter.

You have to connect the prescibel motion drivers for translation and rotation in series.

See the attached
Spatial_Motion2_fix.msim

If your block is a linear time invariant system you could try to export it to a file with the option S-function.

If this file is readable you could try to extract the coefficients and enter them into Transferfunction component of MapleSim.

See help(componentLibrary,signalBlocks,continuous,TransferFunction)

I do not have Simulink so I can't try it myself.

Using a reduced set of assumptions

f:=(theta*x-1)*(1-x)*(1+beta*x^2)-y;
params:=theta=5,y=2/10;
assump:=0<beta,beta<1;
solve({subs(params,f),assump},x);

Maple 2023 returns the 4 roots within 0<beta<1. I could not manage to reduce the number of roots with the other assumptions. The assumption 1/5<x<1 does not fit to the 3rd and 4th root which seem to be complex. Maple somehow cannot detect this.

Nothing in the help system.

I got this from the web:

In Maple, debugger/no_output is a command-line option that can be used to suppress the output produced by the Maple debugger. When the debugger command is used to debug a Maple procedure or module, Maple will normally print debugging information to the console or worksheet as the program executes. However, by adding the no_output option to the debugger command, you can suppress this output.

I don't know if it makes sense. Apparently it's from Maple 2021 but all the links are broken.

Your are trying to solve this

solve([x[1]/2, (2*x[2])/9, -1], {x[1], x[2], x[3]});

Solve does not return an answer because of the thrid "equation" and the subsequent command throws an error.

Pasting your code snippet in 2D-Math and converting it to 1D-Math results in

`??` := 1;
`??` := 2;
`??` := 3;
`??` + `??`;
                            ?? := 1

                            ?? := 2

                            ?? := 3

                               6

All Babyloninan numerals are replaced by a double tofu (i.e. internaly represented by the symbol `??`). There are no individual representations for 𒐕, 𒐖 and 𒐗. Since the last assignment to `??`is 3 the sum becomes 6.

The fact that the Maple paraser converts some unicode characters to `??` means nothing else that not all characters are supported at the moment.

&#9785;

Inkscape could be an option for vector graphics. Its open source and free.

restartM := LinearAlgebra:-RandomMatrix(6, 7, generator = 0 .. 1)
convert(M, listlist)
NonZeroInRow := `~`[nops](%)-map(numboccur, %, 0)

Matrix(%id = 36893490345080494788)

 

[[0, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 1, 1, 0], [0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1, 0], [1, 0, 0, 1, 0, 1, 0]]

 

[5, 3, 4, 4, 3, 3]

(1)


Maybe someone has an idea to replace the 0 in numboccur by an expression that is not equal zero. This would make the nops dispensable

Download NonZerosInRow.mw

Edit, this statement is wrong:  If you want to use eval you have to load the Standard package.
I can't give an explanation why the Simple environement can't deal with that simple expression.

Consider not loading any package for such simple task. The basic environment is quite powerfull. Simplify has to be used in this case instead of eval.

NULL

restart; interface(version)

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

(1)

`&alpha;__1` = arctan(l__1*sin(alpha)/(l__1*cos(alpha)+l__2))

alpha__1 = arctan(l__1*sin(alpha)/(l__1*cos(alpha)+l__2))

(2)

l__1 = 50*Unit('mm'), l__2 = 40*Unit('mm'), alpha = 120*Unit('arcdeg')

l__1 = 50*Units:-Unit(mm), l__2 = 40*Units:-Unit(mm), alpha = 120*Units:-Unit(arcdeg)

(3)

eval(alpha__1 = arctan(l__1*sin(alpha)/(l__1*cos(alpha)+l__2)), [l__1 = 50*Units:-Unit(mm), l__2 = 40*Units:-Unit(mm), alpha = 120*Units:-Unit(arcdeg)])

alpha__1 = arctan(50*Units:-Unit(mm)*sin(120*Units:-Unit(arcdeg))/(50*Units:-Unit(mm)*cos(120*Units:-Unit(arcdeg))+40*Units:-Unit(mm)))

(4)

simplify(alpha__1 = arctan(50*Units:-Unit(mm)*sin(120*Units:-Unit(arcdeg))/(50*Units:-Unit(mm)*cos(120*Units:-Unit(arcdeg))+40*Units:-Unit(mm))))

alpha__1 = arctan((5/3)*3^(1/2))

(5)

with(Units)

Automatically loading the Units[Simple] subpackage
 

 

simplify(alpha__1 = arctan(50*Units[Unit](mm)*sin(120*Units[Unit](arcdeg))/(50*Units[Unit](mm)*cos(120*Units[Unit](arcdeg))+40*Units[Unit](mm))))

alpha__1 = arctan(5*sin(120*Units:-Unit(arcdeg))/(5*cos(120*Units:-Unit(arcdeg))+4))

(6)

with(Units[Standard])

eval(alpha__1 = arctan(l__1*sin(alpha)/(l__1*cos(alpha)+l__2)), [l__1 = 50*Units[Unit](mm), l__2 = 40*Units[Unit](mm), alpha = 120*Units[Unit](arcdeg)])

alpha__1 = arctan((5/3)*3^(1/2))

(7)

NULL

Download Units_simple_not_simplified.mw

until this bug get fixed: Do not load the Units[Standard] package. The default environment is already quite powerful.

 

First 11 12 13 14 15 16 17 Page 13 of 17