Re: To Wolfram Mathgroup. Help me..
- To: mathgroup at smc.vnet.net
- Subject: [mg121030] Re: To Wolfram Mathgroup. Help me..
- From: "W. Craig Carter" <ccarter at mit.edu>
- Date: Wed, 24 Aug 2011 03:14:00 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201108230948.FAA02706@smc.vnet.net>
Hello Jiwan, Before showing you how to get the plot, I would like to recommend using SetDelayed (:=) and Set(=) differently from what you are using. It may be useful for you to do a bit of background reading on the differences. I like to use this example to instruct my students: wasDate = DateString[]' isDate := DateString[] Table[Pause[1]; {i, wasDate, isDate}, {i, 1, 5}] OK, for your plot, I was able to create it from your code by using the following after evaluating your parameters. integrand[t_] := f[z]*=CE=B7[z, t] refNormF[t_] := NIntegrate[integrand[t], {z, 0, Infinity}] Plot[refNormF[t], {t, -.02, .05}] If you don't like plotting that singularity at t approx .002, you could eliminate it with the Exclusions option in Plot. You can also find good advice in this group about defining integrand with a NumericQ restricted pattern, but it is not necessary in this particular case. Kind Regards, Craig On 23 Aug, 2011, at 5:48 AM, Jiwan Kim wrote: > Hello, mathgroup. > > I send you this mail to ask your help in fixing the error. > I have a minor error message in the following code. > I have got a error message "No more memory available.Mathematica kernel has > shut down." whenever I wanted to get ReflNorm[t] by integrating > f[z]*Eta[z,t]. > This is not a complex code. This is strange. > If I use 'NIntegrate' instead of 'Integrate', it seems working well. > But, there appears another error message like following. > > "NIntegrate::inumr: "The integrand 0.0247936\ \[ExponentialE]^<<1>>\ \ > Sign[<<1>>]\ (6.5\ Cos[1.08875-0.0389557\ z]-1.3\ Sin[1.08875-<<21>>\ \ > z]) has evaluated to non-numerical values for all sampling points in \ > the region with boundaries {{0,200}}."" > > Could you help me to fix these errors ? > Thank you in advance. > > Best regards, > Jiwan. > > Remove["Global`*"]; > \[Rho] := 8910;(* mass density : kg/m^3 *) > v := 4080;(* sound velocity : nm/ns *) > \[Beta] := 1.3 10^-5;(* linear expansion : /K *) > B := 1.8 10^11; (* bulk modulus : Pa *) > c := 3 10^8; (* light speed : nm/ns *) > \[Lambda] := 800; \[Omega] := > 2 \[Pi] c/\[Lambda]; (* light wavelength : nm *) > Cl := 3.96 10^6; (* lattice heat cap. : J/m^3K = 26.1 J/mol.K *) > g := 4.4 10^17; (* coupling constant : W/m^3.K *) > K := 91; (* thermal conductivity : W/m.K *) > Q1 := 0.2199; (* (g/K)^(1/2) : /nm *) > \[Xi]1 := 13.5; (* pump absorption depth: nm *) > \[Xi]2 := 14.5; (* probe absorption depth: nm *) > Dl := 2.3 10^-5; (* diffusivity : m^2/s *) > n := 2.48; k := 4.38 ;(* reflectivity index at 800 nm *) > A1 := 1.3; A2 := 6.5; (* dn/d\[Eta], dk/d\[Eta] *) > R := 0.3; (* reflection at interface *) > \[Eta]0 := 1; > > f0 = 8 (2 \[Pi])/\[Lambda] (n^2 (n^2 + k^2 - 1)^2 + > k^2 (n^2 + k^2 + 1)^2)^(1/2)/((n + 1)^2 + k^2)^2; > \[Phi] = ArcTan[(k (n^2 + k^2 + 1))/(n (n^2 + k^2 - 1))]; > f[z_] := f0 (A1 Sin[(4 \[Pi] n z)/\[Lambda] - \[Phi]] + > A2 Cos[(4 \[Pi] n z)/\[Lambda] - \[Phi]]) Exp[-z/\[Xi]2]; > \[Eta][z_, > t_] := \[Eta]0 \[Xi]1 Q1 Sign[v t - z] Exp[-Q1 Abs[z - v t]]; > ReflNorm[t_] = Integrate[f[z]*\[Eta][z, t], {z, 0, Infinity}] > Plot[ReflNorm[t], {t, -0.02, 0.05}, PlotRange -> All] > > -- > = --------------------------------------------------------------------------= ----------------------- > Institute of Physics and Chemistry of Materials Strasbourg (IPCMS) > Department of Ultrafast Optics and Nanophotonics (DON) > 23 rue du Loess, B.P. 43, > 67034 STRASBOURG Cedex 2, France
- References:
- To Wolfram Mathgroup. Help me..
- From: Jiwan Kim <hwoarang.kim@gmail.com>
- To Wolfram Mathgroup. Help me..