maple - Can you simplify an expression in terms of pre defined variables?

别等时光非礼了梦想. 提交于 2021-01-29 15:26:02

问题


I have some particular dimensionless numbers commonly used in fluid mechanics. I want to express a certain expression in terms of these variables.

If I define my dimensionless numbers and then do

simplify(*expression*)

where the expression is a function of variables that have all been used at least once in the definition of the dimensionless numbers, is it able to give this expression in terms of these dimensionless numbers? Can it be used to save time with this sort of algebra?

Many thanks !

E.g dimensionless numbers :

 Re = (\rho U_0 H_0) / \mu    
 Ca =( \mu U_0 )/ (\sigma)     
 St = (T_0 U_0)/H_0     
Fr = U_0 /(\sqrt(G_0 H_0))   
Oh = (\mu}/\sqrt( \rho \sigma H_0)    
Bo =(\rho G_0 H_0^2) /\sigma

If I do :

simplify(G_0 H_0 / U_0 ^2)

Will it give the answer as 1/Fr^2

Or would I instead need to type something like :

simplify(( G_0/H_0 U_0), )Fr=...)

So e.g will it tell me what combination of dimensionless numbers I can write \mu/(U_0^2 H_0) as, if I write :

Simplify ( mu/U_0^2 H_0   )

Or :

Simplify (( \mu/(T_0 H_0)  ) , Re=...,Fr=...,Ca=...St=..., Bo=..., Oh=...)

回答1:


Firstly you should correct your formatting, since all your expressions are not pretty-printing properly. (They appear like raw TeX.)

If you want people to show you Maple solutions, then it'd be more helpful to present your equations in plaintext Maple source.

You appear to have the equation,

Fr = U_0 / sqrt(G_0 * H_0)

and you also appear to be expecting that this would allow a manipulation of,

G_0/(H_0 * U_0)

to obtain,

1/Fr^2

How does that follow!? (edit: It doesn't follow.)

There are several Maple commands for substitution and variable elimination that may help here, including:

simplify(expr, {eqs});
eliminate({eqs}, {vars});
solve({eqs}, {vars});
algsubs(eq, expr);

and so on. But first it seems best to confirm that your equations and expectation(s) are as stated.

[edit] Now that the expected target has been edited and corrected, here is one way to get a result.

restart;

eq1 := Uo/sqrt(Go*Ho)=Fr:
new1 := targ1 = Go*Ho/Uo^2:

eval(targ1, new1) =
eval(targ1, solve({new1, eq1},
                  {targ1,Go,Ho,Uo}));

                      Go Ho    1 
                      ----- = ---
                         2      2
                       Uo     Fr 


来源:https://stackoverflow.com/questions/65480368/maple-can-you-simplify-an-expression-in-terms-of-pre-defined-variables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!