MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

SmithChart.mw
 If I want to plot Smith Chart ,how do I mark a circle of arbitrary values?

then,How do I avoid the polar line to cover other  circle line?

Any body can give me some ideas or better ways to plot Smith Chart?

Thanks.

(Z0)   + I Ω    

(ZL) + I Ω

(ω) rad/s

α dB/m= Np/m

(β) rad/m

Zg

(l)

(z)  l

(Vg)

(u)

output:                                                                 

                

(Γ)                                 

(Γ)

            

 (SWR)  

 

(zL):

           

 (YL): S

  tanhγℓ

  tanβℓ

 (Zin):   Ω

  (zin):

    (γ):

(Vo)(z=0): V

      (Io)(z=0): A

Vo+):      V         

(Vo-):  V 

               (Vs): V

  (Is): A

             ):

  r=     ,   x=   Yo=

``
with(plots):

 

``

 

``

````

``

``

help("?")

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL



Download SmithChart.mwSmithChart.mw

 

Dear Maple enthusiasts,

I am unable to find a working method to solve a system of 8 equations, of which 4 are differential equations. The system contains 8 unknown variables and the goal is to find an expression for each of these variables as a function of the time t. I have attached the code of my project at the bottom of this message.

I have tried the following:

  1. Using solve/dsolve to solve all 8 equations at once. This results in Maple eating up all of my memory and never finishing its calculations.
  2. First using solve to solve the 4 non-differential equations so that I get 4 out of 8 variables as a function of the 4 remaining variables. This results in an expression containing RootOf() for each of the 4 veriables I'm solving for, which prevents me from using these expressions in the 4 remaining differential equations.
  3. First using dsolve to solve the differential equations, which gives once again an expression for 4 variables as a function of the 4 remaining variables. I then use solve to solve the 4 remaining equations with the new found expressions. This results in an extremely long solution for each of the variables.

The code below contains the 3rd option I tried.

Any help or suggestions would be greatly appreciated. I have been scratching my head so much that I'm getting bald and whatever I search for on google or in the Maple help, I can't find a good reference to a system of differential equations together with other equations.

 

 

restart:

PARK - Mixed control

 

 

Input parameters

 

 

Projected interface area (m²)

A_int:=0.025^2*Pi:

 

Temperature of the process (K)

T_proc:=1873:

 

Densities (kg/m³)

Rho_m:=7000: metal

Rho_s:=2850: slag

 

Masses (kg)

W_m:=0.5: metal

W_s:=0.075: slag

 

Mass transfer coefficients (m/s)

m_Al:=3*10^(-4):

m_Si:=3*10^(-4):

m_SiO2:=3*10^(-5):

m_Al2O3:=3*10^(-5):

 

Weight percentages in bulk at t=0 (%)

Pct_Al_b0:=0.3:

Pct_Si_b0:=0:

Pct_SiO2_b0:=5:

Pct_Al2O3_b0:=50:

 

Weight percentages in bulk at equilibrium (%)

Pct_Al_beq:=0.132:

Pct_Si_beq:=0.131:

Pct_SiO2_beq:=3.13:

Pct_Al2O3_beq:=52.12:

 

Weight percentages at the interface (%)

Constants

 

 

Atomic weights (g/mol)

AW_Al:=26.9815385:

AW_Si:=28.085:

AW_O:=15.999:

AW_Mg:=24.305:

AW_Ca:=40.078:

 

Molecular weights (g/mol)

MW_SiO2:=AW_Si+2*AW_O:

MW_Al2O3:=2*AW_Al+3*AW_O:

MW_MgO:=AW_Mg+AW_O:

MW_CaO:=AW_Ca+AW_O:

 

Gas constant (m³*Pa/[K*mol])

R_cst:=8.3144621:

 

Variables

 

 

with(PDEtools):
declare((Pct_Al_b(t),Pct_Al_i(t),Pct_Si_b(t),Pct_Si_i(t),Pct_SiO2_b(t),Pct_SiO2_i(t),Pct_Al2O3_b(t),Pct_Al2O3_i(t))(t),prime=t):

Equations

 

4 rate equations

 

 

Rate_eq1:=diff(Pct_Al_b(t),t)=-A_int*Rho_m*m_Al/W_m*(Pct_Al_b(t)-Pct_Al_i(t));

 

Rate_eq2:=diff(Pct_Si_b(t),t)=-A_int*Rho_m*m_Si/W_m*(Pct_Si_b(t)-Pct_Si_i(t));

 

Rate_eq3:=diff(Pct_SiO2_b(t),t)=-A_int*Rho_s*m_SiO2/W_s*(Pct_SiO2_b(t)-Pct_SiO2_i(t));

 

Rate_eq4:=diff(Pct_Al2O3_b(t),t)=-A_int*Rho_s*m_Al2O3/W_s*(Pct_Al2O3_b(t)-Pct_Al2O3_i(t));

 

3 mass balance equations

 

 

Mass_eq1:=0=(Pct_Al_b(t)-Pct_Al_i(t))+4*AW_Al/(3*AW_Si)*(Pct_Si_b(t)-Pct_Si_i(t));

 

Mass_eq2:=0=(Pct_Al_b(t)-Pct_Al_i(t))+4*Rho_s*m_SiO2*W_m*AW_Al/(3*Rho_m*m_Al*W_s*MW_SiO2)*(Pct_SiO2_b(t)-Pct_SiO2_i(t));

 

Mass_eq3:=0=(Pct_Al_b(t)-Pct_Al_i(t))+2*Rho_s*m_Al2O3*W_m*AW_Al/(Rho_m*m_Al*W_s*MW_Al2O3)*(Pct_Al2O3_b(t)-Pct_Al2O3_i(t));

 

1 local equilibrium equation

 

 

Gibbs free energy of the reaction when all of the reactants and products are in their standard states (J/mol). Al and Si activities are in 1 wt pct standard state in liquid Fe. SiO2 and Al2O3 activities are in respect to pure solid state.

 

delta_G0:=-720680+133*T_proc:

 

Expression of mole fractions as a function of weight percentages (whereby MgO is not taken into account, but instead replaced by CaO ?)

x_Al2O3_i(t):=(Pct_Al2O3_i(t)/MW_Al2O3)/(Pct_Al2O3_i(t)/MW_Al2O3 + Pct_SiO2_i(t)/MW_SiO2 + (100-Pct_SiO2_i(t)-Pct_Al2O3_i(t))/MW_CaO);
x_SiO2_i(t):=(Pct_SiO2_i(t)/MW_SiO2)/(Pct_Al2O3_i(t)/MW_Al2O3 + Pct_SiO2_i(t)/MW_SiO2 + (100-Pct_SiO2_i(t)-Pct_Al2O3_i(t))/MW_CaO);

 

Activity coefficients

Gamma_Al_Hry:=1: because very low percentage present  during the process (~Henry's law)

Gamma_Si_Hry:=1: because very low percentage present  during the process (~Henry's law)

Gamma_Al2O3_Ra:=1: temporary value!

Gamma_SiO2_Ra:=10^(-4.85279678314968+0.457486603678622*Pct_SiO2_b(t)); very small activity coefficient?
plot(10^(-4.85279678314968+0.457486603678622*Pct_SiO2_b),Pct_SiO2_b=3..7);

 

Activities of components

a_Al_Hry:=Gamma_Al_Hry*Pct_Al_i(t);
a_Si_Hry:=Gamma_Si_Hry*Pct_Si_i(t);
a_Al2O3_Ra:=Gamma_Al2O3_Ra*x_Al2O3_i(t);
a_SiO2_Ra:=Gamma_SiO2_Ra*x_SiO2_i(t);

 

Expressions for the equilibrium constant K

K_cst:=exp(-delta_G0/(R_cst*T_proc));

Equil_eq:=0=K_cst*a_Al_Hry^4*a_SiO2_Ra^3-a_Si_Hry^3*a_Al2O3_Ra^2;

 

Output

 

 

with(ListTools):
dsys:=Rate_eq1,Rate_eq2,Rate_eq3,Rate_eq4:
dvars:={Pct_Al2O3_b(t),Pct_SiO2_b(t),Pct_Al_b(t),Pct_Si_b(t)}:
dconds:=Pct_Al2O3_b(0)=Pct_Al2O3_b0,Pct_SiO2_b(0)=Pct_SiO2_b0,Pct_Si_b(0)=Pct_Si_b0,Pct_Al_b(0)=Pct_Al_b0:
dsol:=dsolve({dsys,dconds},dvars):

Pct_Al2O3_b(t):=rhs(select(has,dsol,Pct_Al2O3_b)[1]);
Pct_Al_b(t):=rhs(select(has,dsol,Pct_Al_b)[1]);
Pct_SiO2_b(t):=rhs(select(has,dsol,Pct_SiO2_b)[1]);
Pct_Si_b(t):=rhs(select(has,dsol,Pct_Si_b)[1]);

sys:={Equil_eq,Mass_eq1,Mass_eq2,Mass_eq3}:
vars:={Pct_Al2O3_i(t),Pct_SiO2_i(t),Pct_Al_i(t),Pct_Si_i(t)}:
sol:=solve(sys,vars);

,


Download Park_-_mixed_control_model.mw

Hello all of you,

I'm new here and I have a problem.

For homework I have to write a Maple package for the usage of dual quaternions. This is not a problem.

For example two functions of the package:

MyQuaternions := module()

  export Pretty, Ugly:
  local l1:
  option package:
 
  protect('i,j,k,epsilon'):
 
Pretty := proc(q::Vector)
  description "":
  return LinearAlgebra[Transpose](q)[1..4].Vector([1,i,j,k])+epsilon*(LinearAlgebra[Transpose](q)[5..8].Vector([1,i,j,k])):
end proc:

Ugly := proc(q)
  description "":
  local a;
  a := Vector(8);
  a[1]:=remove(has,remove(has,q,epsilon),{i,j,k});
  a[2]:=coeff(remove(has,q,epsilon),i,1);
  a[3]:=coeff(remove(has,q,epsilon),j,1);
  a[4]:=coeff(remove(has,q,epsilon),k,1);
  a[5]:=remove(has,coeff(q,epsilon),{i,j,k});
  a[6]:=coeff(coeff(q,epsilon),i,1);
  a[7]:=coeff(coeff(q,epsilon),j,1);
  a[8]:=coeff(coeff(q,epsilon),k,1);
  return a:
end proc:

end module:

savelib('MyQuaternions'):

 

Now I can load the module in a differnet maple worksheet "main.mw" by typing "with(MyQuaternions):"

The crucial thing now is the following: i,j,k,epsilon should be protected in "main.mw". I can do this by typing "protect('i,j,k,epsilon'):" Is there a way to tell maple to protect these variables automatically when the module is loaded? Or do I always have to type in the protect command by hand?

Thank you,

Josef

For application of object recognition with 3d sensor

plot3d(subs(c=1, a*b+a*c), a=-1..1, b=-1..1);
plot3d(subs(c=1, a+a*b*c), a=-1..1, b=-1..1);

after draw above two equations, they looked having similar structure

i find a book

Differential Geometry and its application John Oprea, page 98

having some measure to determine the shape, however they seems for

2 variables and need parametric form

how to use them to determine above two equations which have 3 variables

 

a*b+a*c  and  a+a*b*c

 

though not know the 3 variables version of below code, 

i think subs(c=1, a*b+a*c), subs(a=1, a*b+a*c), subs(b=1, a*b+a*c)

3 sets of equations after substitute third variables with 1, is it still possible to determine the shape?

 

 

EFG := proc(X)
local Xu, Xv, E, F, G;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
E := DotProduct(Xu,Xu,conjugate=false);
F := DotProduct(Xu,Xv,conjugate=false);
G := DotProduct(Xv,Xv,conjugate=
false);
simplify([E,F,G]);
end:
UN := proc(X)
local Xu, Xv, Z, s;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Z := CrossProduct(Xu,Xv);
s := VectorNorm(Z,Euclidean,conjugate=false);
simplify(<Z[1]/s|Z[2]/s|Z[3]/s>,sqrt,trig,symbolic);
end:
lmn := proc(X)
local Xu,Xv,Xuu,Xuv,Xvv,U,l,m,n;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Xuu := <diff(Xu[1],u), diff(Xu[2],u), diff(Xu[3],u)>;
Xuv := <diff(Xu[1],v), diff(Xu[2],v), diff(Xu[3],v)>;
Xvv := <diff(Xv[1],v), diff(Xv[2],v), diff(Xv[3],v)>;
U := UN(X);
l := DotProduct(U, Xuu, conjugate=false);
m := DotProduct(U, Xuv, conjugate=false);
n := DotProduct(U, Xvv, conjugate=false);
simplify([l,m,n],sqrt,trig,symbolic);
end:
shape := proc(X)
local Y,Z,a,b,c,d;
Y:=EFG(X);
Z:=lmn(X);
a:=simplify((Z[1]*Y[3]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
b:=simplify((Z[2]*Y[1]-Z[1]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
c:=simplify((Z[2]*Y[3]-Z[3]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
d:=simplify((Z[3]*Y[1]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
[S(x_u)=a*x_u+b*x_v,S(x_v)=c*x_u+d*x_v];
end:
shape_matrix := proc(X)
local Y,Z,a,b,c,d;
Y:=EFG(X);
Z:=lmn(X);
a:=simplify((Z[1]*Y[3]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
b:=simplify((Z[2]*Y[1]-Z[1]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
c:=simplify((Z[2]*Y[3]-Z[3]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
d:=simplify((Z[3]*Y[1]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2));
Matrix([[a,c],[b,d]]);
end:

how to convert between (system of polynomials or module) and rational function which is a four dimensional space

1. is module in algebraic geometry or group cohomology to classify homology group?

2. is final result like this? for example,

a dictionary  or table store

homology group 1, key=invariant = 1 hole in topological space , value = module 1, module 2 module 3 etc

homology group 2, key=invariant = 2 holes in topological space , value =module 4, module 5, module 6 etc

homology group 3, key=invariant = 3 holes in topological space , value = module 7, module 8.. etc

 ... etc

 

3. i find betti number can count holes, however how to know the form for

all combination?

i mean if it is module, how to change the module to get the full combination

http://www.singular.uni-kl.de/Manual/html/sing_159.htm

i find betti number's input is just ideal, but it is not module

if ideal is enough, why need module?

how to permuate module? and what do it classify and result in module?

1. is module in algebraic geometry for classification of topological space which a poset is a frame

2. which invariant is for doing this classification of topological space in algebraic geometry or group cohomology?

3. if want to do full combination before classification, which kind of polynomials be a full combination

4. is poset just like function fst and snd function for meet and join in functional programming instead of using "and" and "or" logic? how a matrix group related with topological space which a poset is a frame?

5. is there any invariant function for classification of topological space in maple?

I am working on fopurier analysis and below is what I have. The method I used worked fine when I had a piecewise continuous function, but now the bottom int function below is not calculating the integral.

restart;
with(plots);

f := 2*sin(Pi-Pi*exp(-t))

 

A[0] := (1/3)*(Int(f, t = 0 .. 3))

A[0] := (1/3)*(int(f, t = 0 .. 3))   I think this one is evaluating it correctly. The bold and italicized below is the answer from this calulation

A[0] := (2/3)*Si(Pi)-(2/3)*Si(exp(-3)*Pi)

 

a[n] := (2/3)*(Int(f*cos(2*Pi*n*t*(1/3)), t = 0 .. 3))  this prints the integral like I want it to.

a[n] := (2/3)*(int(f*cos(2*Pi*n*t*(1/3)), t = 0 .. 3))  this just reporints the integral, I want it to evaluate it. Am I doing something wrong? Even with the assume(n, integer); it still just prints the integral.

 

 

Is there any help that y'all can provide? My professor is not ver proficent in the Math softwares out there.

Hello,

how to write a^tilde , a^check on maple

thank,

Gerard.

How about this equation

restart:
solve(x^2 - 2*(m+1)*x+m^2 - 2*m + m^2=0,{x},parametric=full);
allvalues(%);?

Greetings to all!

Recently I encouter the following issue:

Maple (version 17) coudn't recognize that 20.0 equals with 20 and with 20.00. Believe me, this is very annoying!

Do I miss something? Is there any command that do the trick?

 

Thank you!

Giorgos K.

 

 

Hi,

 

   I have a set of linear equations in terms of Ax+B=0, where A and B are matrices.

  I used linsolve or LinearSolve to solve the equations.

   Is there any simple way to run linsolve/LinearSolve parallelly? suppose I already have matrices A and B.

 

Thank you very much

  

 

#page 320 and 322 of book Singular introduction to commutative algebra

it return too many recursion 

 

hilbertseries([a+a*c, a+a*b, a+b+c]);

eq1 := a+a*c;

eq2 := a+a*b;

eq3 := a+b+c;

eq1a := Homogenize(eq1, h);

eq2a := Homogenize(eq2, h);

eq3a := Homogenize(eq3, h);

T3:=lexdeg([a,b,c,h]);

GB := Basis([eq1a,eq2a,eq3a], T3); #a

 

#MonomialHilbertPoincare(LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3));

 

with(PolynomialIdeals):

MonomialHilbertPoincare := proc (I3)

#I3:=[LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3)];

T2:=lexdeg([h,c,b,a]);

varj := [h,c,b,a];

I2 := InterReduce(I3, T2);

s := nops(I2);

if I2[1] = 0 then return 1 end if:

if I2[1] = 1 then return 0 end if:

if degree(I2[s]) = 1 then return (1-varj[1])^s end if:

lt := LeadingTerm(I2[s],T2);

leadexp := [degree(lt[2],h),degree(lt[2],c),degree(lt[2],b),degree(lt[2],a)];

j := 1;

for z from 1 to nops(leadexp) do

                if leadexp[j] = 0 then

                                j := j + 1;

                end if:

od:

finallist := [];

for z from 1 to nops(GB) do

                finallist := [op(finallist), GB[z]+varj[j]];

od:

quotientlist := Generators(Quotient(GB, varj[j]));

finallist2 := [];

for z from 1 to nops(quotientlist) do

                finallist2 := [op(finallist2), op(z,quotientlist)];

od:

return MonomialHilbertPoincare(finallist) + varj[1]*MonomialHilbertPoincare(finallist2);

end proc;

F:=[LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3)];

MonomialHilbertPoincare(F);

 

 

 

but if restart the program,the menu of Plot Builder is appear,in same function(x^2+y^2+(1/1000000000)*z-25 = 0),why thing like this happen?

when run the order like this, the menu of Plot builder disapper

Thank you in advance for your help

Hi,

I was wondering how I could assign small angel assumptions so that I could simplify an equation of motion to solve for theta double dot. Thank you for your help.


Download small_angle_assumption.mw

Equation Manipulation

-assumptions- small angel

"sin(`&vartheta;`):=`&vartheta;`"

`&vartheta;`

(1)

"cos(`&vartheta;`):=1"

1

(2)

diff(`&vartheta;`(t), t) := 0

NULL

diff(x(t), t, t) := (H+u)/M


I*(diff(`&vartheta;`(t), t, t)) = [m*(-l*(diff(`&vartheta;`(t), t))^2*cos(`&vartheta;`)-l*(diff(`&vartheta;`(t), t, t))*sin(diff(`&vartheta;`(t), t)))-m*g]*l*sin(`&vartheta;`)+[m*(l*(diff(`&vartheta;`(t), t))^2*sin(`&vartheta;`)-l*(diff(`&vartheta;`(t), t, t))*cos(diff(`&vartheta;`(t), t))+diff(x(t), t, t))]*l*cos(`&vartheta;`)

"(->)"

Error, (in isolate) unable to isolate diff(diff(`&vartheta;`(t), t), t)

 

NULL

``


Download small_angle_assumption.mw

5 6 7 8 9 10 11 Last Page 7 of 1057