C_R

1960 Reputation

19 Badges

5 years, 317 days

MaplePrimes Activity


These are replies submitted by C_R

Can you provide Maple code that crashes?

I have an open question about volume integrals that I would like to at least ask without the need of getting an answer right away:
Is it possible to compute the moment on inertia about an arbitrary oriented axis? A stopped at the point where I could not manage to define the domain of a cylinder.

Maybe such an example fits better in the “Physics Courseware Support: Mechanics”.

@Thomas Richard 

Thank you!
With AllSolutions it becomes a question of equaltiy of integrals where I am stuck:
 

expr0 := int(1/(sqrt(x__0-x)*sqrt(-x^2+1)), x = 0 .. x__0, allsolutions); `assuming`([expr0], [0 < x__0 and x__0 < 1])

 

2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), I*(x__0+1)^(1/2)/(1-x__0)^(1/2))/(1-x__0)^(1/2)

(1)

Remove the imaginery unit by hand

expr1_new := 2*EllipticF(sqrt(x__0)/sqrt(x__0+1), -sqrt(x__0+1)/sqrt(x__0-1))/sqrt(1-x__0)

2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2)

(2)

expr2 := sqrt(2)*EllipticF(sqrt(1-1/(x__0+1))*sqrt(2), (1/2)*sqrt(x__0+1)*sqrt(2))

2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))

(3)

plot(expr1_new-expr2, x__0 = 0 .. 1)

 

queryequal(expr1_new, expr2)

queryequal(2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2), 2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2)))

(4)

difference := op(1, queryequal(2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2), 2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))))-op(2, queryequal(2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2), 2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))))

2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2)-2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))

(5)

`assuming`([convert(difference, Int)], [0 < x__0 and x__0 < 1])

2*(Int(1/((-_alpha1^2+1)^(1/2)*(1-(x__0+1)*_alpha1^2/(x__0-1))^(1/2)), _alpha1 = 0 .. x__0^(1/2)/(x__0+1)^(1/2)))/(1-x__0)^(1/2)-2^(1/2)*(Int(2/((-_alpha1^2+1)^(1/2)*(-2*_alpha1^2*x__0-2*_alpha1^2+4)^(1/2)), _alpha1 = 0 .. (1-1/(x__0+1))^(1/2)*2^(1/2)))

(6)

`assuming`([simplify(%)], [0 < x__0 and x__0 < 1])

-2*2^(1/2)*(Int(1/((-_alpha1^2+1)^(1/2)*(4+(-2-2*x__0)*_alpha1^2)^(1/2)), _alpha1 = 0 .. x__0^(1/2)*2^(1/2)/(x__0+1)^(1/2)))+2*(Int(1/((-_alpha1^2+1)^(1/2)*((x__0+1)*_alpha1^2+1-x__0)^(1/2)), _alpha1 = 0 .. x__0^(1/2)/(x__0+1)^(1/2)))

(7)

``

 

NULL

 

Can someone help?
 

Download Equality_of_Elliptic_expressions_02.mw

What you indend to do sounds intersting.

Could you give or refer to examples of what the final result you want might look like?

I didn't find anything useful that matched the keywords in your question.

@tomleslie 

Regrettably I forgot to mention that my simplified example is an excerpt from a larger worksheet where I took care of unit inconsistency risk mitigation (Testdimension in this case).

Your answer illustrates the step that I do for the time being: substituting s by a dimensionless s (s=s*Unit(1/s)) and doing the “simplifications”.

The result is an expression which is partially dimension less. To resolve this mixture of dimensionless expressions and expression with dimension, the dimensionless s has to be replaced by s=s*Unit(s). In summary, two substitutions I am looking to make expendable.

The reason why I have to restore a transfer function with units of s in Hertz is that I want to take advantage of recent plot functionality with units (the DynanmicSystems package does not provide this).

Off course an expand option is only one way. That’s why I added some other thoughts maybe worth considering the day an enhancement of the DynamicSystems package is planned.

Thanks for taking the time to highlight potential risks.

 

@dharr 

To complete the method you have given, it might be required to delete unnecessary characters (a colon in your example).

On a 4k display the box placeholders come with addtional information. I don't know if that is the case on 2k. fo could mean "function of". The multiplication box before the integration variable is interesting because mathematically there is no multiplication. However, when you drag an drop the integral (in the ouput of q) to a new input line (2 times), the new input shows that Maple correctly interprets the expression.

int(GAMMA(s + a)*GAMMA(b - s)*z^(-s), s = c - i*infinity .. c + i*infinity)

 

Overall, with a bit of caution errors and time can be saved with your method.
Thank you!

@AmirHosein Sadeghimanesh I have no idea. I think it should work without the style option.

It would be helpful if you upload your Maple worksheet. For that use the green arrow in the menu of the editor.

@acer Thank you for the example. It perfectly shows the differences.

@EngM 

Have you considered using a C code block? Technically, you could export Maple expressions to C code once the results of your matrix calculation are derived in an explicit form so that they can become the outputs of a C code block.

In the image above I have recently done this for large expressions. Since the sequence of essential steps and commands is hard to remember I have summarized them here for myself and others.

Consider asking how your matrix calculations can be done in a separate question (preferably with attached example files). It's and interesting one. It’s not excluded that there are other solutions.

Also your question about connecting components inside a Modelica component (and @WhiteNoise's answer) would have been worth branching off to make the content easier to find. 

 

@acer @Carl Love 

This explains many of my misinterpretations. I just realized that there is more than one Typeset command in Maple and that the typeset I use in plot commands is a structure used for type setting.

Thank you as allways!

@sursumCorda 

Yes, plot in Maple 2022 does not even need assumptions.

plot([sqrt(x*(2 - x)/3), 1 - sqrt((1 - x^2)/3)]);

Smartplot is from 1997 and may no longer be needed given the many new plot features that have been introduced since then.

interface(verboseproc = 3);
print(smartplot);

@neskopolydis 

You are are welcome. EC 2.5 is truncated to 2 (and negative values are replaced by zero).

Maybe this can help you in your explorations:

If you put EC_y to 2, MapleSim integrates two variables (the two elastic coordinates). You can see this in the console output

The corresponding equation for the bending line (for EC_y=2) for the dynamic deflection in y looks probably like this

Compare this to text book formulas for the quasi-static case

I agree that the flexible beam component deserves more explanation for better use.

@neskopolydis 

I cannot give a definition for elastic coordinates (EC), nor indicate a scientific domain where this term is commonly used.

Like me, you are guessing in the wrong direction. In my case I attributed EC to the number of coordinates of nodes (points across a structure) in finite element formulation to describe the deformation field (across an element). But that’s incorrect.

In my current interpretation I would call EC: “Coefficient of shape function”.

I had the chance to get some explanations, which allows me to say that the flexible beam component has a solid mechanical and mathematical formulation. What MapleSim achieves with the component is pretty cool: Partial differential equations are solved alongside with discrete components in a multi body environment.

Each component in MapleSim has states which describe the dynamics of the component. The states can be deduced from generalized coordinates that MapleSim determines during the simulation process. This is perhaps where the ECs got their name from. In the screen shot of the console output window below you can see how the generalized coordinates match the entries in the EC fields (u is for displacement in x, v in y and so on).

(You may want to delete the connection line to the rigid body frame and observe how the generalized coordinates change).

I would describe EC in the following way: The ECs are generalized coordinates of the flexible beam component which describe the (dynamical!) deformation of the component. The deformation is approximated with “shape” functions which are polynomials, and the EC are the coefficients of the polynomial. Such an approach is similar to the Ritz method with the difference that in a dynamic situation these coefficients have to be determined at each time step. If I am not mistaken the flexible beam component can be considered as a high fidelity finite beam element. Parameterization is like having access to a library of finite beam elements in a single component. Another cool thing.

In your load case, the shape function for EC=2 matches the shape of the deformed beam known from linear theory exactly.  A higher degree of polynomials will not give better results. As Orang said, for different load cases or constraints along the beam you might need higher polynomial orders. Alternatively, you can split the beam in two wherever a constraint or a load is applied. I have no experience which approach is better.

I hope my description is sufficiently correct. In the Multi body example “2-D Flexible Spin-up Beam” are references that I have not studied, which might give you more insight.  

@ecterrab 

"&Thanks;" for the tweak. I have noticed that in Maples doocumentation both notations dx and dx are used. The Calculus Study Guide for example uses an italic d for input in integration examples. Also wikidepdia uses different notation depending on the language when searching for "differential". From this persepective a general implementaion would make sense.

BTW: I like the term integration element that you used in "Integral Vector Calculus and parametrization of regions" to avoid calling the vektorical dr and dS in an integral a differential. This term could also be used to refer to a simple dx in an integral.

First 22 23 24 25 26 27 28 Last Page 24 of 36