dharr

Dr. David Harrington

8552 Reputation

22 Badges

21 years, 54 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

If I open to my default blank worksheet and then close the tab so that there is no open worksheet, then I can see the recent documents list but trying to open the most recent document fails (nothing happens), but I can open other recent documents further down the list.

I had noticed this before in the context of working on the most recent document, then closing its tab to leave no open worksheets, then I cannot reopen it from the recent documents list.

@MichaelVio So I agree with your dimensional analysis. At some point you set k:=1/2. But k is Boltzmann's constant. I think you want to change Boltzmann's constant to be k__B, and then k is something else. But I don't understand what you want to do.

@MichaelVio I'm guessing you will need to non-dimensionalize again. But  has units of kg.m^2 on the rhs and kg.m^2.s^(-2) on the rhs. So maybe if you fix that it will run.

@MichaelVio N*V in plg.mw has units of m^3, not energy.

@Suryakanth I don't understand what you are doing. As far as I can see, you are not solving the pdes and just plotting some sin functions that look like streamlines.

@Suryakanth Syntax errors in multiline 2D Maple input are extremely hard to debug because there is no line information.
One solution is to do smaller amounts of code per exceution group.
Alternatively (and probaby better) you could copy it into the startup code edit region and the add line breaks. Debugging there is much easier.

Am I to understand that you are no longer going to solve any pdes and just want to plot known functions?

@MichaelVio So NV comes out J*s^3, not J*s^3/m^3 - is there something missing? Later you call this Et, so just to be clear the name Et is not meant to represent energy? The constant 2.5*10^-91 is unreasonably small for good numerics. I would propose writing e=E/kT as a dimensionless energy, then lumping all the other constants into a combined constant C.

Was V meant to be (4/3)*Pi*rb^3? (as in an earlier worksheet of yours)

restart;

with(PDEtools, dchange):with(plots):

with(Units):

Automatically loading the Units[Simple] subpackage
 

params:={k= 1.3806490000*10^(-23)*Unit(J/K),rb=5.293*10^(-11)*Unit(m),
ec= 1.602176634*10^(-19)*Unit(C),Tq=1.765*10^(-19)*Unit(s),
c= 299792458*Unit(m/s),T=297*Unit(K),A=1,nu1=7.880979442*10^14*Unit(s^(-1)),E__nu1=8.941594733*10^(-20)*Unit(J)};

{A = 1, E__nu1 = 0.8941594733e-19*Units:-Unit(J), T = 297*Units:-Unit(K), Tq = 0.1765000000e-18*Units:-Unit(s), c = 299792458*Units:-Unit(m/s), ec = 0.1602176634e-18*Units:-Unit(C), k = 0.1380649000e-22*Units:-Unit(J/K), nu1 = 0.7880979442e15*Units:-Unit(1/s), rb = 0.5293000000e-10*Units:-Unit(m)}

N:=8*Pi*Tq^2*nu^2*E(nu)/(c^3*(exp(E(nu)/(k*T)) - 1));V:=Pi*rb^3;

8*Pi*Tq^2*nu^2*E(nu)/(c^3*(exp(E(nu)/(k*T))-1))

Pi*rb^3

Find value and units of NV at nu1 and E__nu1.

NV:=N*V;
eval(eval(NV,{E(nu)=E__nu1,nu=nu1}),params);

8*Pi^2*Tq^2*nu^2*E(nu)*rb^3/(c^3*(exp(E(nu)/(k*T))-1))

0.2546180250e-90*Units:-Unit(s*kg*m^2)

Expected units.

convert(1*Unit(J*s^3/m^3),system,base);

Units:-Unit(kg*s/m)

Non dim energy e=E/kT; combine constants.

NV2:=eval(NV,E(nu)=e(nu)*k*T);
const:=8*Pi^2*Tq^2*k*T*rb^3/c^3;
algsubs(const=C,NV2);

8*Pi^2*Tq^2*nu^2*e(nu)*k*T*rb^3/(c^3*(exp(e(nu))-1))

8*Pi^2*Tq^2*k*T*rb^3/c^3

nu^2*e(nu)*C/(exp(e(nu))-1)

 

NULL

Download plm3.mw

@MichaelVio As my worksheet shows, inserting nu1 into the formula does not lead to a real value of E. So the initial condition you gave is inconsistent in some way. Please check I entered your numbers correctly. And the solution does not lead to real solutions for any nu in that range. Part of the issue is likely numerical issues as I discussed.

@MichaelVio Perhaps there is some problem with the derivation, but in any case, the parameters are varying over too many orders of magnitude to be easy to solve.

plm2.mw

You should non-dimensionalize to solve this problem. I can try to help with this but I need to know the units of all the quantitites. Tg in s, rp in m, N in ?, E in J, etc. Is N*V supposed to be energy?

I would supply an initial condition to dsolve. Otherwise you will need to supply a value for _C1. If you specify explicit=true in dsolve then you will get a solution of the form E(vu) = ...

You had a 4th dependent variable p(x,y) but there are only 3 pdes. So I just got rid of it by multiplying it by zero.

The problem is that the time-based variable, say x, is second order, and so needs 2 "initial" conditions for each function, say the value of the function at 0 and the value of its derivative at 0; it cannot have a boundary condition away from 0.

I adjusted the conditions to make sol_square successful, so you can see how these conditions would have to be. It you change a second derivative condition at zero to a boundary condition at 1 you will get an error message about elliptic equations.

Bottom line; Maple's solver cannot deal with the case of two boundary conditions for each of x and y.

cavity_work_error2.mw

@Suryakanth I'm sorry, I've misled you; the single-equation limitation is for methods other than the default method. The default method can do a system of pdes - see ?pdsolve,numeric. But there can be only one "time" variable and one "space" variable. So you should be able to use it for your (x,y) system for the square, by choosing one of them to be the time variable.

But you won't be able to do the h cavity.

I don't understand the streamlines, but can take a look at the basic code later, perhaps tomorrow.

pdsolve cannot numerically solve a system of  three pdes - "The use of pdsolve/numeric with these methods is restricted to a single parabolic/hyperbolic PDE that is first order in time." (see help page ?pdsolve,numeric,education).

The available methods (aside from the default) are listed on the same page as

ForwardTime1Space[backward/forward]
CenteredTime1Space[backward/forward]
BackwardTime1Space[backward/forward]
Euler/ForwardTimeCenteredSpace
CrankNicholson/CenteredTimeCenteredSpace
BackwardEuler/BackwardTimeCenteredSpace
Box[backward/forward]
LaxFriedrichs
LaxWendroff
Leapfrog
DuFortFrankel

so I'm not sure where you got "method=fd". Perhaps you wanted the first of these?

Even if pdsolve could solve this system it could only solve the simple square geometry. The h shape does not seem to have enough symmetry to break it into several smaller problems.

You need some specialized software like COMSOL to tackle these types of problems. 

@salim-barzani So in p1.mw, the linear/nonlinear part had a non-linear part, which by my definition is incorrect. [Edit: what I mean by that is the logic that works for p1.mw depends on the linear/nonlinear definition, which applied to pde-condition.mw gives the wrong answer]  So you need to answer my question. Otherwise I am not able to understand how it works.

@sand15 The  Kucharska & Pielaszkiewicz thesis in the NIG definition cites ref 4, which is at https://www.jstor.org/stable/4616433 and has an asymptotic formula for K1 (Eq. 2.9) that is the same as DLMF 10.25.3.

Strange and interesting. Thanks for the stimulation :-)

1 2 3 4 5 6 7 Last Page 1 of 90