chengran

8 Reputation

5 Badges

9 years, 148 days
Munich, Germany

MaplePrimes Activity


These are replies submitted by chengran

As you said, the answer will be simplily zero, which is not right. Secondly, the point to give b.c. is to work out the constants automatically. Later, I will add more items in the expression. That could be problematic.

As you said, the answer will be simplily zero, which is not right. Secondly, the point to give b.c. is to work out the constants automatically. Later, I will add more items in the expression. That could be problematic.

Problem seems to have been solved. Thank you.

Problem seems to have been solved. Thank you.

> restart;
>
> with(PDEtools);
>
> with(Units[Standard]);
> with(ScientificConstants);
>
> #
>
> # Electron velocity distribution:
>
> f[e] := A[e]*exp(-B[e]*(((1/2)*m[e]*v^2)^2+((1/2)*m[e]*v^2*m[e])*`ϖ`^2*lambda[e]^2)/T[e]^2);
> f[e, 1] := f[e]/A[e];
>
> f[e, 2] := (1/2)*f[e, 1]*m[e]*v^2;
> expr[e, 1] := `assuming`([4*Pi*(int(f[e, 1]*v^2, v = 0 .. infinity))], [positive]);
> expr[e, 2] := `assuming`([4*Pi*(int(f[e, 2]*v^2, v = 0 .. infinity))], [positive]);
> expr[e, lhs] := simplify(expr[e, 1]/expr[e, 2]);
> expr[e, rhs] := 1/T[e];
> eq[e, 1] := expr[e, lhs]/expr[e, rhs] = 1;
>
> # Constants:
> `ϖ` := 22*10^6*Unit('Hz');
> T[e] := 3*Unit('eV');
> lambda[e] := Unit('mm');
> m[e] := evalf(Constant(m[e], units));
>
> eq[e, 2] := simplify(eq[e, 1]);
> B[e] := fsolve(eq[e, 2], B[e]);
> A[e, res1] := simplify(1/expr[e, 1]);
> A[e, res2] := simplify(T[e]/expr[e, 2]);
>

Download questions_1.mpl.txt

> restart;
> with(PDEtools);
>
>
> # Electron velocity distribution:
> f[e] := A[e]*exp(-B[e]*(((1/2)*m[e]*v^2)^2+((1/2)*m[e]*v^2*m[e])*`ϖ`^2*lambda[e]^2)/T[e]^2);
> f[e, 1] := f[e]/A[e];
>
> f[e, 2] := (1/2)*f[e, 1]*m[e]*v^2;
> expr[e, 1] := `assuming`([4*Pi*(int(f[e, 1]*v^2, v = 0 .. infinity))], [positive]);
> expr[e, 2] := `assuming`([4*Pi*(int(f[e, 2]*v^2, v = 0 .. infinity))], [positive]);
> expr[e, lhs] := simplify(expr[e, 1]/expr[e, 2]);
> expr[e, rhs] := 1/T[e];
> eq[e, 1] := expr[e, lhs] = expr[e, rhs];
>
> # Constants:
> `ϖ` := 22*10^6;
> T[e] := (3*1.6)*10^(-19);
> lambda[e] := 0.1e-2;
> m[e] := 9.1*10^(-31);
>
>
>
> eq[e, 2] := simplify(eq[e, 1]);
> B[e] := fsolve(eq[e, 2], B[e]);
> A[e, res1] := simplify(1/expr[e, 1]);
> A[e, res2] := simplify(T[e]/expr[e, 2]);
>

Download questions_2.mpl.txt

I am solving two coefficients (A_e and B_e) in one velocity distribution function (3D) with two closures (1: normalization 2: average kinetic energe).  I solved B_e first by dividing 2 closures which eliminate A_e first and then recalculate A_e by substituting B_e to either of two closures. See file question_1 and questions_2 (describing the same question with/without using physics units). In question_2, I do not use units system. However, the A_e obtained from two closures are 3 order different, which makes no sense at all. In question_1 I use units then A_e from the 2nd closures won't return anything. Can anyone explain why it happens and suggest some tricks to avoid it? Thank you in advance.

 

@Scott03

Sure. I will upload a maple input file in this post to shown what problem I am dealing with. :) Thanks 

I checked. Theoretically expr_1 and expr_2 should not be zero at all. But thanks for the hint anyway. I will upload the input file so maybe you can have a look.

I checked. Theoretically expr_1 and expr_2 should not be zero at all. But thanks for the hint anyway. I will upload the input file so maybe you can have a look.

@Alejandro Jakubi 

Thank you for your hint. It is very helpful. I won't stick to this point.

@Alejandro Jakubi 

Thank you for your hint. It is very helpful. I won't stick to this point.

@Alejandro Jakubi 

actually, B,C,D in my example have already been simplified. In my original work, it contains a long expression. As I use 'dchange', it returns a lim (actually, I tried use 'isolate' to reform the expression but did not really work), which is different form from what you gave in Math7 as well as what I got in Maple if I use a simplified form.

@Alejandro Jakubi 

actually, B,C,D in my example have already been simplified. In my original work, it contains a long expression. As I use 'dchange', it returns a lim (actually, I tried use 'isolate' to reform the expression but did not really work), which is different form from what you gave in Math7 as well as what I got in Maple if I use a simplified form.

To my opinion, those two integrals share the same feature. but why only eq6 can be evaluated?

as in title, I changed the form by put some symbols together and then the maple evaluate, which confuses me a lot. I did not change the kernel of the integral actually.

In fact, I could have done it in a stupid way that first simplify it then resubsitute. But it creats a lot of work

as in title, I changed the form by put some symbols together and then the maple evaluate, which confuses me a lot. I did not change the kernel of the integral actually.

In fact, I could have done it in a stupid way that first simplify it then resubsitute. But it creats a lot of work

1 2 Page 1 of 2