Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@acer As long as you are going to submit a bug report, you might as well add this to your llist:

restart;
plots:-display(
	plot(x^2, x=-1..1),
	plot(1-x^2, x=-1..1),
labels=["",""], overrideoption=true);

According to the documentation, we would expect to see no labels in this plot, but we see that the horizontal axis is still labeled "x". 

 

@Kitonum If you increase the font size as I have done, you will see that both your examples leave large blank spaces for the non-existent labels, as I have shown in the first figure in my post. 

@emendes I know nothing about Lie derivatives, so I hope that someone else can help you with that.

@vv I have linux running on a somewhat old and slow machine. In Maple 2021.1 it takes about 30 seconds to export your graphics to EPS.  I do it by right-clicking on the graphics and selecting Export -> Encapsulated Postscript. That produces the expected result.  The file size is about 15MB.

I had never used the plottools:-exportplot command before. Doing that results in a 14MB file and I see that it has very noticeable artifacts.  Someone should submit an SCR.

As far as I can tell, both methods produce true vectorized graphics. Unlike the PDF export, these  are not rasterized images.

Maple's inability to export graphics as PDF is deplorable. Its export of 3D graphics as PDF is useless since it amounts to exporting a rasterized image in a PDF wrapping.  The fact that the exported image is embedded in a 612 x 792 pts size paper, adds insult to injury.

As you have noted, this issue has been around for many years. Perhaps with some more nagging, Maplesoft will take action to address it before this decade is out. 

Aside: Exporting to EPS works well provided that the image has no transparent objects. But that's not a fault of Maple; the EPS format is not designed to handle transparency.

 

Which is correct?

  (3,4) < (4,3)

or

  (4,3) < (3,4)

 

@ecterrab That's a great improvement. Thanks! I especially like the fact the generated LaTeX code is so much more readable/editable than what we used to get before.

In the sample PDF that you have shown above, we see a small glitch. In the input line correspoding to the label (4) we have 

solve(sys_set, \{diff(theta(t),t,t), tau(t)\}):

The backslashes should not be there.

 

@PsiSquared Ahh, now I see what you are doing. You use Maple's drawing tools to annotate an image, but when you export the entire document as a PDF, the annotations in the PDF file are shifted relative to the image.

I must confess that I have never used Maple's drawing tools. Now that I try it out, I see the problem that you are seeing.  This is on Maple 2021 on Linux.

Here I have a workaround for you.

Annotate the image as needed, preferably in a separate worksheet of its own. Take a screenshot of the image and save the screenshot as a PNG file. Then insert that PNG image wherever you need the image. I just tried that and I see that exporting tthe full worksheet to PDF works as expected.

For the record, here is the PGF of your drawing:

 

 

@PsiSquared A couple of things:

  1. What utility/program did you use to add elements to the image?
  2. From what you have written it appears that you saved the modified image as PDF. Is that correct? If it is so, then upload that image as well for diagnostic purposes.  If the image was not saved as PDF, in what format was it saved?
  3. How did you insert the image into the Maple worksheet? As far as I can tell, you cannot insert a PDF image into a Maple worksheet.

The more details that you provide, the more helpful responses you can expect to get.

 

@PsiSquared In reading your initial post I assumed that the image was produced within Maple. In looking at your worksheet now I see that the image was produced externally and then pasted into Maple.

I can't tell what sort of image that is.  It is neither PDF, nor JPG, nor anything else that I know of. Within the worksheet I can grab pieces of the image and move them around.  Can you tell us how you produced that image?

 

I don't have a mac, but for those readers who do, it will help if you upload your worksheet. It would be difficult to diagnose a problem by just looking at screenshots.

 

@itsme I don't know why the tilde is needed.  The diff command used to require a tilde in the same way but now it works on vectors and arrays without the tilde. It may just be that the int command has not caught up yet.

@ecterrab The sentence that you have quoted from Wikipedia about dyadics being obsolete refers to Gibbs' notation and terminology. He used ab to indicate the dyadic product of the vectors a and b. In modern notation one writes ab for that. That Wikipedia sentence is followed by "its uses in physics include continuum mechanics and electromagnetism". Any relatively modern (I mean post-1970s) book on continuum mechanics begins with the algebra of the dyadics, and the notation pervades the rest of the book. I spend a week or so on dyadics when I teach a course on continuum mechanics.

I like doing calculations in Maple to the extent possible.  But when calculating with the equations of motion of a continuum in anything other than Cartesian coordinates—this could be a problem as simple as flow of a fluid through a pipe—I end up going to paper and pencil since Maple does not provide a facility for calculating gradients of vectors in cylindrical or spherical coordinates. So if you get around to extending the Physics[Vectors] package in that direction, that would be a very welcome addition.

 

@nm Calculating the gradient of a vector field in Cartesian coordinates is straightforward. Things are more complicated in curvilinear coordinates such as cylindrical and spherical.

Look, for instance, at the gradient of the scalar field f(ρ,φ,z) in cylindrical coordinates. The correct answer is 

or more explicitly, 

The answer given by Senia Sheydvasser in what you have quoted, is equivalent to saying that the gradient is

which is obviously wrong.

See my reply to Edgardo on how to express the gradient of a vector field in cylindrical coordinates.

@ecterrab In my original post I wrote that Gradient in Physics[Vectors] works as expected on scalar fields, but the Gradient of a vector field is not available. In your reply you are saying, in effect, that the Gradient of a vector field is not available. That's just what I said, isn't it?  We agree on that.

Now that we know that the Gradient of a vector field is not available in Physics[Vectors], can we do something to make it available? Consider this as a feature request.

As I wrote in my original post, calculating gradients of vector fields is central to continuum mechanics (including elasticity and fluid mechanics).  We don't want to ignore people who work in those fields, do we?

Perphaps the following mini-discourse will help shed light on what is needed. I know that you don't need a lesson on tensors, but plesae indulge me.

What is missing in Physics[Vectors]  is the algebra of dyadic products
(also known as the tensor product) of vectors.  Let's write V for the space
of vectors in the three-dimensional Euclidean space, and by that I don't
mean real^3;  I mean vectors as Euclid would have understood them,
that is, pointed arrows in 3D. That's what Physics[Vectors] 

expresses as `#mover(mi("a"),mo("&rarr;"))`, `#mover(mi("b"),mo("&rarr;"))`, etc.

 

Linear operators on V are called second order tensors (in the

Euclidean space setting). Let's write L for the the set of those

operators.  L itself is a linear space in the usual sense of addition

and multiplication by scalars.

 

The gradient of a vector field is a linear operator on V, and therefore

a second order tensor.  So what I have asked for in the original post,
amounts to a wish for having support for the algebra and calculus of
second order tensors in the 
Physics[Vectors] package.

 

Physics[Vectors] introduces the `#mover(mi("&rho;",fontstyle = "normal"),mo("&circ;"))`, `#mover(mi("&phi;",fontstyle = "normal"),mo("&circ;"))`, `#mover(mi("k"),mo("&circ;"))` vectors for a basis of the

(3-dimensional) vector space V associated with the point rho, phi, zin
cylindrical coordinates. What is missing is a basis for the (9-dimensional)
space of second order tensors Lat rho, phi, z. These may be constructed from

 `#mover(mi("&rho;",fontstyle = "normal"),mo("&circ;"))`, `#mover(mi("&phi;",fontstyle = "normal"),mo("&circ;"))`, `#mover(mi("k"),mo("&circ;"))` through the dyadic products `&otimes;`(`#mover(mi("&rho;",fontstyle = "normal"),mo("&circ;"))`, `#mover(mi("&rho;",fontstyle = "normal"),mo("&circ;"))`), "(rho)&otimes;(phi), (rho)&otimes;""(k), ..., "`#mover(mi("k"),mo("&circ;"))` "&otimes;"`#mover(mi("k"),mo("&circ;"))`
(see below.)  A good naming scheme for these in Physics[Vectors] would be `#mover(mi("&rho;&rho;"),mo("&circ;"))`, `#mover(mi("&rho;&phi;"),mo("&circ;"))`, etc.
Then the 
gradient of a vector field `#mover(mi("v"),mo("&rarr;"))`(rho, phi, z) would be a linear combination of those
nine basis elements. One can show that if
"(v)(rho,phi,z)=`v__rho`(rho,phi,z) (rho)+`v__phi`(rho,phi,z) (phi)+`v__z`(rho,phi,z) (k),"

then

"grad (v)(rho,phi,z)=      (&PartialD; `v__rho`)/(&PartialD; rho) (rhorho)+1/(rho)((&PartialD; `v__rho`)/(&PartialD; phi)-`v__phi`/(rho)) (rhophi)+(&PartialD; `v__rho`)/(&PartialD; z) (rhoz)    +(&PartialD; `v__phi`)/(&PartialD; rho)(phirho) + 1/(rho)((&PartialD; `v__phi`)/(&PartialD; phi)+`v__rho`/(rho))( phiphi)+(&PartialD; `v__phi`)/(&PartialD; z)( phiz)    +(&PartialD; `v__z`)/(&PartialD; rho) (zrho)+1/(rho)(&PartialD; `v__z`)/(&PartialD; phi)(zphi)+(&PartialD; `v__z`)/(&PartialD; z)(zz).  "

In that setting, the derivative of `#mover(mi("v"),mo("&rarr;"))` in the direction of an arbitrary vector

`#mover(mi("h"),mo("&rarr;"))` = alpha*`#mover(mi("&rho;",fontstyle = "normal"),mo("&circ;"))`+beta*`#mover(mi("&phi;",fontstyle = "normal"),mo("&circ;"))`+gamma*`#mover(mi("k"),mo("&circ;"))` would be the vecor (grad "(v)) (h)."


Those familiar with the Navier-Stokes equations of fluid mechanics

will recognize (grad "(v)) (v)" as the expression for the

fluid's convective acceleration. Similarly, applications in nonlinear elastiicity
invariably call for calculating gradients of vector fileds.

 

The major hurdle toward adding this feature would be the

implementation of the algebra of dyadic products in Physics[Vectors].

I can't tell how much effort that will take.

 

For the record, the dyadic product "(a )&otimes;(b)" of two vectors `#mover(mi("a"),mo("&rarr;"))`, `in`(`#mover(mi("b"),mo("&rarr;"))`, V) is
a second order tensor, that is, an object in L, defined through the
property
"(""(a )&otimes;(b)" ) `#mover(mi("x"),mo("&rarr;"))` = Typesetting[delayDotProduct](`#mover(mi("b"),mo("&rarr;"))`.`#mover(mi("x"),mo("&rarr;"))`, `#mover(mi("a"),mo("&rarr;"))`, true), for all `in`(`#mover(mi("x"),mo("&rarr;"))`, V)
where `#mover(mi("b"),mo("&rarr;"))`.`#mover(mi("x"),mo("&rarr;"))` is the usual dot product of vectors.

 

 

First 28 29 30 31 32 33 34 Last Page 30 of 99