dharr

Dr. David Harrington

8582 Reputation

22 Badges

21 years, 60 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

@MichaelVio Here is the other approach. I don't follow what you are trying to do, but the values you are using don't seem reasonable. Note that the approximations made in deriving the Planck law assume the volume is much much larger than the photon wavelengths and there are many many photon energy states in the frequency range; not sure they apply here.

phot3.mw

@GunnerMunk Please upload.

@C_R I think the new rule based system is likely an extra layer on top of the existing system to give more flexibility, but didn't change the existing lower-level system.

@salim-barzani It works after you remove "=0".

sys-Dr-D.mw

@salim-barzani As usual I do not set the ODE =0.
If you put the coeffs in a list rather than a set, they are in 1:1 correspondence with the monomials.

system1.mw

@MichaelVio The worksheet uses dsolve to solve your equation, but it has a singularity and won't work for the values you use.

phot2.mw

It explains how to find k*T, but doesn't work here because of the strange function.

In terms of the photon gas, it seems what you are doing is backwards. In the photon gas we have a formula for diff(E(nu),nu) which is a function g(nu) of nu (or omega) Eq 63.5, which is a peaked function (Fig. 7). So to find E(nu) you would integrate the right-hand side. If you want h*nu on the right hand side to be a function h(nu)*nu or E(nu) because you are doing some different physics, then the differential equation would just be diff(E(nu),nu) = g(nu,E(nu)).

If one integrates a peaked function, then the energy will be an increasing function of nu, and you will not find two values of nu with the same energy.

Instead you have written E(nu) = diff(g(nu,E(nu)), nu) for your similar function g, which seems backwards to me.

Edit: I am thinking of E(nu) as the energy of the photons in the gas with frequencies up to nu, but maybe you want some other interpretation. I am not following what you are trying to do.

@MichaelVio I cannot see the Landau&Lifsch.pdf, probably because the system doesn't like the & in the filename. Please upload again.

For 1, you have both he(nu) and h(nu), but I assume you mean to solve the de that led to it, assuming he(nu)=h(nu).

For 2, I am assuming that when you say "fit" you mean find the single value of k*T that makes those two conditions true.

@MichaelVio You said:

"Please advise on solving the Planck.mw and plot the solution for h(nu) with E=ν⸱h(nu). Thus, for nu2 =9.733521364*10^16 =>h(nu2)= 3.348222989*10^(-17) eV*s and the same energy of 3.259eV for nu1 = 7.889275211*10^14 =>h(nu2)=4.135667697*10^(-15) eV*s  With the partular case the plot 

with the supposition that k = 1/2 eV/K, thus kT=>1.380649*10^(-23)*297/(1.60217*10^(-19));
=0.02559, so kT should be the energy close to 0.5 and could be assimilated to an energy E0"

This is my understanding of this: You have a differential equation in h(nu) for which you want the energies at both nu1 = 7.889275211*10^14 s^(-1) and nu2 =9.733521364*10^16 s^(-1) to be the same energy E1 = 3.259eV. You want to find the value of k*T that makes this true. This can be done, though there might be numerical issues.

Since k is just Boltzmann's constant, it seems you want to find the temperature for which this is true? But then I don't know why you specify T = 297 K.

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

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