MaplePrimes Questions

How can I define an arbitrary signature of a space-time metric?

I want to define the signature of the form `++--`.

Multibody exports from MapleSim to Maple convert a symbolic expression to a rational quotient:

The parameters (parameter "a" above) disappear in the exported equations. How can I prevent this (conversion of sqrt3 and disapprence of "a")?

MB_exports_with_rational_quotients_instead_of_symbols.msim

 

Given

restart;
eq:=A=(1/2+x+y)^(3);
the_rhs:=solve(eq,A);

I asked solve to solve the above equation for A, expecting to get back (1/2+x+y)^(3), but it returns instead this

I looked at solve options, and tried number of them, but no change. I was looking for option to tell Maple not to simplify as it solves.

I also tried to see if the solution returned can be put back to the original form, and could not so far find a way, tried simplify and some options. But I did not try every possible method as there are do many.

Compare to Mathematica, which keeps the solution the same, as what one would expect. I see no reason to change it

ClearAll[A,x,y]
eq=A==(1/2+x+y)^3
Solve[eq,A]

The reason I am asking, is that it now makes parsing a little harder as I am looking for something in the form (expression)^power   as the solution.  i.e. the type to be `^`.    Now the type shows up as `*` because Maple for some reason changed it. 

It will easier if Maple did not do that, or if there is a way to change the expression back to the way it was. If all this fails, I have to just make the parsing handle this extra case form if needed.

Any suggestions?

Maple 2022.1

Update

Found a way after lots of trials and errors

simplify(the_rhs,[power,symbolic]);

 

But it would have been better if Maple did not do the simplification in the first place. But I could not find an option to tell it to do that while solving.

 

Unit_vectors_from_different_coordinate_systems.mw
 

restart

NULLNULL

with(Physics)``

with(Vectors)

NULL

It's common in mathematical physics to use cartesian unit vectors to describe the position of a point in space.

 

r_(t) = x(t)*_i+y(t)*_j

r_(t) = x(t)*_i+y(t)*_j

(1)

Sometimes it neccessary to convert a position vector like `#mover(mi("r"),mo("→"))`(t) to another cartensian coordinate system with different unit vectors, I call the primed system. In the primed system the position vector looks like:

"(r')(t)=x'(t) (i')+y'(t) (j')"

When using Physics[Vectors] and the unit vector hat notations to define vectors in cartesian space, can I define more than one cartesian space such as:

`#mover(mi("r"),mo("→"))`(t) = x(t)*`#mover(mi("i"),mo("∧"))`+y(t)*`#mover(mi("j"),mo("∧"))`

NULL

and

  "(r')(t)=x'(t) (i')+y'(t) (j')"?

Another way to ask the same thing: Can I define the position vector in different coordinates, each system having a distinct pair of orthogonal unit vectors?

 

The short answer I think is no. Given the current implementation it's not clear how one would go about defining the relationships between unit vectors from different coordinate systems. See below.

 

In 2D the transformation corresponds to a rotation of a vector the plane. The tranformation is characterized by the rotation angle α.

 

 

 

The unit vectors from different systems are related through scalar products.

 

"(i)*i' =(|i|)*|i'|*cos(alpha)=cos(alpha)"``NULL

NULL

"(j)*(j)' =(|j|)*|(j)'|*cos(alpha)=cos(alpha)"NULLNULL

``

"(j)*(i)' =(|j|)*|(i)'|*cos(3 alpha)=cos(3 alpha)"``NULL

 

Is there a way to implement scalar products of vectors from different coordinate systems using the Physics Tensors package? Here I create three different coordinate systems. I don't know whether the unit vectors systems X and Y have the same (i, j, k) unit vectors or does each system have its own triplet?

NULL

Setup(coordinates = cartesian, metric = Euclidean, dimension = 3, spacetimeindices = lowercaselatin, geometricdifferentiation = true)

[coordinatesystems = {X}, dimension = 3, geometricdifferentiation = true, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}, spacetimeindices = lowercaselatin]
````

(2)

Coordinates(Y, Z, Z = cylindrical)

{X, Y, Z}

(3)

NULL

NULL


 

Download Unit_vectors_from_different_coordinate_systems.mw

 

hi everyone
i have a nonlinear double int which want to be solved and then plot against "z" variable.
INT_problem.mw
tnx in advance

I think I'm going crazy! 

`Maple 2020.1, X86 64 WINDOWS, Jul 30 2020, Build ID 1482634`

solve((20 + 20*T + 2*T*(T + 1))*exp(-T) - 10*exp(-2*T) - 2*T - 10.0 = 0);
                 -10.00000000, -8.309536192, 0.

?????? Why???????

Has anyone gone crazy or what?

Maple 2022.1 on windows 10

restart;
w:=y-x/(c-x):
p1:=plots:-implicitplot(eval(w,c=2),x=-6..9,y=-3..3):
p2:=plots:-implicitplot(eval(w,c=2),x=-6..10,y=-3..3):
p3:=plots:-implicitplot(eval(w,c=2),x=-6..11,y=-3..3):
[p1,p2,p3]

Gives

 

Notice p2. The vertical line is gone. This happens when the range x=-6..10 and it shows back again when x=-6..11 or x=-6..9

Why does this happen? It is the same equation.

 

Expressions of the kind

A cos(phi) - B sin(phi)

are solved by Maple to phi=arctan(A/B)

In such cases: Is there a way to get a solution phi=arctan(A,B) other than in the attached?

If not: Can the attached solution be done more efficient? There are quite some commands involved.

(It may happen that Maple returns "minus arctan". Then the attached solution does not work and has to be preplaced by something more complicated. A solution that always work would be desireable)

MB_exports_Schatz_Mechanism.mw

 

I'm new to Maple Flow.  As an exercise I'm replicating a calculation I did in Mathcad, building a blade element model of a hovering helicopter.  The physics is well documented, but any specific design changes the results. 

The lift and drag values of the airfoil of choice and the blade physical geometry are used to solve for the forces generated at any radial segment, these are integrated along the blade radius to compute the rotor thrust and torque.  These integrals are taking an inordinate amount of time--one blade angle setting took fifteen minutes to compute rotor thrust and torque.  Since the next step is to compute these values over a range of blade angles this poses a significant problem.

I'd post the file if I could figure out how!!

I'm trying to move to Maple Flow after a long time using Mathcad.  (Long enough that I remember when Maple was the symbolic engine in Mathcad.)  So I'm looking for the user's forum (like the old collaboratory), and I thought that MaplePrimes might be that resource.  Under the heading of "Products" I find a list of many different programs--every version of Maple and MapleSim--but Maple Flow is not to be found.

I decided to ask why, only to discover that it magically appears when the question window asks me to "categorize your question" to get it answered faster.  So I guess my question really is, "How do I find information  and questions specific to Maple Flow?"

hello 

i have 3 Arrays and i want to plot them i 2D, 

for example : 

y  := [1,2,3,4,5,6]

x1:= [10,20,30,40,50,60] 

x2:= [0.1,0.2,0.3,0.4,0.5,0.6]

and i want to display at the graph for each y point the value of x1 and x2 by two axis (dualaxis)

any suggestions ? 

 

thank u in advance !

I tried different things but can't figure how to make Maple give a simplified result from int command without these RootOf with sums in them. Here is an example.

restart;
anti:=int(1/(a+x^(1/5)),x);

The strange thing is that doing

eval(anti,a=1)

Keeps these rootsOf and Sums there. But doing

anti:=int(1/(1+x^(1/5)),x);

Gives simplified result without RootOf

I tried DEtools:-remove_RootOf and assumptions and value() but nothing worked. I tried assumptions on a, such as assuming a::integer,a>0 and other things. 

I need similar result as Mathematica:

ClearAll[x, a];
Integrate[1/(a + x^(1/5)), x]

I am sure there is an option in Maple to do that, i.e. give result without these RootOf and Sums. But so far, I could not find it. I looked at options to int() command also. 

Any one know what option to use or how to simplifies it the the above result by Mathematica? 

Maple 2022.1 on windows 10

Is there a way, or a way to get maple to implement, the ability to animate multiple parameters? Basically duplicate all the prameters features(such as the ability to set them to loop, speed, etc).

E.g., suppose I have space curve and I want to rotate in 3 dimensions using a rotation matrix and animate the rotation for visualization purposes. I can animate one rotation angle but not more than one. When clicking on the plot the properties bar adds a slider and other properties I can play with but I can only do it for one angle at a time. It would be nice if I could do it for more than one.

It would be simple, say, as being able to set an array for the parameters, e.g., a=[0..1, 0..Pi, 0..2] and then use a[1], a[2], a[3] for the parameters.

How to make maple 12 to use Intel SGX 1 or SGX 2 to run code secretly? If maple 12 can not, which version of maple can use SGX 1 or SGX 2?

Hi there!

I have developed a component in Modelica to import values from a Matlab struct into MapleSim and use it with other components. This data is saved in a ".mat" file and the struct was constructed as follows:

% Matlab command window
% Struct name is "bemData" saved in a v7 format to be read in by Modelica
>> bemData.m33 = 100;
>> bemData.Ainf33 = 100;
>> bemData.Khs33 = 20000;
>> bemData.ss_rad33.A = [1 1;0 1];
>> bemData.ss_rad33.B = [1;0];
>> bemData.ss_rad33.C = [1 1];
>> bemData.ss_rad33.D = 0;
>> save -v7 bemData.mat

And the Modelica code I am using to try import this into MapleSim is as follows:

Modelica.SIunits.Mass M = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.m33",1,1));

Modelica.SIunits.Mass Ainf = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.Ainf33",1,1));

Modelica.SIunits.TranslationalSpringConstant C = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.Khs33",1,1));
    
Real A[2,2] = Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.A",2,2);

Real B[1,2] = transpose(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.B",2,1));

Real C[1,2] = Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.C",1,2);

Real D = scalar(Modelica.Utilities.Streams.readRealMatrix("bemData.mat","bemData.ss_rad33.D",1,1));

I then use these imported variables to solve ODEs, and the result is incorrect. I have narrowed it down to the fact that MapleSim/Modelica imports a value of 0 in place of the original data in the struct. Moreover, there is no way to attach a probe to any of the imported variables in MapleSim (I need to force all model variables to be displayed in the Simulation results tab).

I would appreciate help in pointing out where I might be making a mistake. My primary concern is why a value of 0 is being imported in place of the actual Matlab struct data. When I use Matlab's command window to check the contents of the struct, they appear to be in order.

Also, I have saved the struct file in the same folder in which my custom component is stored (the Modelica file where I have written the code to import the data). Should I be saving this file elsewhere?

Thank you!

First 176 177 178 179 180 181 182 Last Page 178 of 2308