dharr

Dr. David Harrington

8235 Reputation

22 Badges

20 years, 343 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

@nm The y range is the default one, which is what DEFAULT means. If another range has been chosen, then it will be there. 

p := plot(sin(x), x = -1 .. 10):

v := op(select(type, p, specfunc(VIEW)));

VIEW(-1. .. 10., DEFAULT, _ATTRIBUTE("source" = "mathdefault"))

p := plot(sin(x), x = -1 .. 10, view = [-2 .. 9, DEFAULT]); -1; v := op(select(type, p, specfunc(VIEW)))

VIEW(-2 .. 9, DEFAULT)

p := plot(sin(x), x = -1 .. 10, view = [-2 .. 9, 0 .. 1]); -1; v := op(select(type, p, specfunc(VIEW)))

VIEW(-2 .. 9, 0 .. 1)

p := plot(sin(x), x = -1 .. 10, 0 .. 1); -1; v := op(select(type, p, specfunc(VIEW)))

VIEW(-1. .. 10., 0. .. 1.)

``

Download view.mw

@mehdi jafari Your revised PDE is much simpler to solve, but it still needs one more boundary/initial condition as @tomleslie pointed out. As he also pointed out, if an analytical solution could be found, it would have one arbitrary constant. That is the case here, where your solution still contains _C1.

@dharr So I added in the surfdata, which I think is what you want. I really don't understand why the bottom of the z range wouldn't be zero. The managing of the ticks and ranges could be improved, since some are done locally and some passed to the procedure. surfdata needs to know what range the data is over, which has to be 0.1..0.9, even if the plot goes from zero to 1. You could read the 0.1..0.9 in from the Excel file. Note the three plot ranges can be given in the view option.
 

NULL

restart

grids := proc (M, x_min, x_max, y_min, y_max) local z_min, z_max, plot_f, xz, yz, xy; z_min := 0.11e-6; z_max := 0.1e-2; plot_f := plots:-surfdata(M, .1 .. .9, .1 .. .9); xz := plot3d([x, y_min, z], x = x_min .. x_max, z = z_min .. z_max, style = line, color = blue, thickness = 0, grid = [6, 6]); yz := plot3d([x_min, y, z], y = y_min .. y_max, z = z_min .. z_max, style = line, color = blue, thickness = 0, grid = [6, 6]); xy := plot3d([x, y, z_min], x = x_min .. x_max, y = y_min .. y_max, style = line, color = blue, thickness = 0, grid = [6, 6]); plots:-display(plot_f, xz, yz, xy, lightmodel = none, tickmarks = [6, 6, 6], labels = [x, y, "Error"], labeldirections = [horizontal, horizontal, vertical], axes = frame, orientation = [45, 70, 0], view = [0 .. 1, 0 .. 1, 0.11e-6 .. 0.1e-2]) end proc:

dat := ExcelTools:-Import(cat(currentdir(), "/PlotTest.xlsx"), 1, "B2:J10"):

grids(dat, 0, 1, 0, 1);

NULL

NULL

 

Download Yasi2.mw

@yasi You can use display to combine the surfdata with your plot3d grids. If you want to scale the data by 1000, say, you can use 1e3*~dat.

If you aren't happy with any of the answers here, you need to explain exactly what you want - what is the image showing?

You should upload your worksheet using the green up-arrow in the editor.

@Rouben Rostamian  I missed your comment as I was writing my method. Perhaps my answer then is GIGO. It would be nice to have an analytical solution. I think in general an incompatiblilty in the initial condition can just indicate a step change (intended) in conditions at t=0, such as putting a uniform temperature object in contact with a freezer at t=0, forcing the boundary temperature immediately to a lower value. But I didn't think about the lack of a t derivative in this context.

@ijuptilk The theta(z,0) = thetab*sin(pi/2)*z IC is not compatible with the theta(d,t)=0 BC. Is this intended? And sin(pi/2)=1 so is this right?

@C_R Don't know much about Maplesim, but for electronics schematics (circuit diagrams), they moved away from arcs for non-crossing. They then went to a dot on the intersection if there was a connection, but the newer way is that connections are always at a T.

@nm Since v and theta are coupled, the time dependence of theta induces a time dependence of v. pdsolve (without any boundary/initial conditions) gives a general analytical solution where both theta and v are functions of z and t. Whether or not this solution can be made to fit the ic/bcs is not clear to me.

@mehdibgh Perhaps as a way to get initial guesses for fsolve, if the nonlinear problem is close to this...

@Christian Wolinski kk := Matrix(1, 8, {(1, 1) = .500000000000000+0.*I, (1, 2) = 0.1825477032e-15-.5879378012*I, (1, 3) = -.500000000000000+.555570233019603*I, (1, 4) = -0.2691433088e-15-.5879378012*I, (1, 5) = .500000000000000+0.*I, (1, 6) = -0.2691433088e-15+.587937801209679*I, (1, 7) = -.500000000000000-.5555702330*I, (1, 8) = 0.1825477032e-15+.587937801209679*I})

PDEtools:-casesplit seems to be for this purpose, but I've not used it.

@zenterix I was surprised to see the symbols in the plot of floor(x) - they seem to be an "added extra" just for floor(x). They can be enhanced by symbolsize = 20, symbol = solidcircle, but Maple doesn't seem to have them for more complicated functions. You could add symbols yourself by combining the line plot you have with plots with style=point, symbol=solidcircle and style=point, symbol=circle. The three plots could be combined using plots:-display. However, you would have to calculate the endpoints separately, and not using the floor function.

Edit: See plot,discont for more info on getting better discont detection and other options.

@vs140580 See ?ExcelTools,Export. Just write a row of the matrix (or a row vector), specifying the start cell for it.

First 55 56 57 58 59 60 61 Last Page 57 of 85