mmcdara

7891 Reputation

22 Badges

9 years, 64 days

MaplePrimes Activity


These are replies submitted by mmcdara

@Carl Love 

Thank you Carl, I'm going to look in the direction you suggest.
If I meet some problems I will open a new thread on more specific points(it will probably take me a few days to do that and it's not always easy to follow a discussion which was open long ago)

Thanks again

@dharr @Carl Love

The subject of my question concerns the generation of dimensionless forms of ordinary differential equations.
In this process a quantity whose dimension is homogenous to a time, for instance, is replaced by the product of a quantity T homogenous to a time and a dimensionless quantity tau. The same thing is done for all quantities whose dimension is homogenous to a fundamental dimension (time, length, mass, ...).
So the idea to "tag" all such quantities by their dimension and try do do some algebra automatically to obtain the desired dimensionless equation.
If you are not familiar with this process you might look here Nondimensionalization.

I am accustomed to carrying out this process by hand, each time in an ad hoc manner according to the ode in question. And I would like to automate it.
Which is not that simple: for instance, if you look to the illustrative example in the reference given above, how is it possible to transform diff(x(t), t) into xc/tc * diff(chi(tau), tau) ?

The idea I had in mind was the following:

  • suppose I have "tagged" x as a 'length' and t as a 'time', writting  x = L*xa and t=T*ta where the subscript means that the referred quantity is dimensionless and capital letters denote a characteristic quantiy of fundamental dimension
  • then I replace diff(x(t), t) by (L/T)*diff(xa(ta), ta)


 

 

 

@acer 

Right, I had forgotten this wrapping mechanism.
"Another choice of dummy name would be better, IMO." and IMO too !
 

@Pascal4QM 

A precision, ``is affected to some value (just type ``; to verify this). But there is little chance if any that someone use a variable mith such a strange name in its code.
I guess ``is the shortest symbol which looks "neutral".

Instead of `` you can also use special characters such as £, §, ...
Unfortunately ~ is protected and can't be used

But, at the very end, tomleslie's reply is probably the simplest way to proceed.

@Rouben Rostamian  

That's exactly what I meant.
I too was thinking of using events but I thought they were limited to CI problems and not allowed for CB problems?
That said, I think it would indeed be a very fun project...
Hope to see soon another amazing work of yours
 

@Rouben Rostamian  

 

Let's take this simple example (image from File:Beam_bending2.svg)

The static case will help ckatifying my previous reply.

Suppose the force F is applied at the middle of the beam whose weight is W.

Let R the force each support applies on the beam. The static equilibrium simply writes 2*R + F - W = 0

If F is negativethere is no problem at all in writting this, but if F > W the static equilibrium no longer exists. In this case the beam lifts up from its support and would keep go away under a constant acceleration F-W.
This is of course a little bit stupid but this enlightens my purpose (at least I hope so).

Remark that the weight of the beam, usually neglected  in elementary beam theory, plays here a crucial role.
Consider now a dynamic loading where F is defined by piecewise(t < T, -C*t, 0) where C is some strictly positive constant.
From t= 0 to T the force is downward oriented with increasing magnitude. The beam bends more and more and accumulate a an elastic energy E which is (old school memories) proportional to  int( int(diff(u(x, t), x$2), x=0..L), t=0..T).

At time T this energi is brutally released and this might cause the beam to take-off from its supports and begin a "free flight regime" (during which it will "flaps its wings"), until its own weight brings it back onto its supports (a phenomenon that can appear wth ball-and-sockets supports for instance).

Simulating this situation is very complex because there are two different PDEs to sole: a PDE in the "beam-support contact case" and one for the "no beam-support contact case".

And now, if F is periodic force whose reference pattern is piecewise(t < T, -C*t, 0), the beam can present a serie of take-off and landing... those "rebounds" I refered to.

 

 

@Rouben Rostamian  

Hi Rouben, it's me again.

The more I look at your code, the smarter I find it.
I have a technical question: why did you consider the default BC are ball-and-socket joints unless extra BCs are given to  specify "clamping" ( I hope it's the correct english term, like at the left end of your cantilever beam in example 3). This prevents the simulation of simple supports; is it because the beam then could have rebounds at these supports and not always be in contact with them?

@Rouben Rostamian  

So I'll wait...

 

@dk 

Thanks, take care of yourself too.
 

@radaar 

I don't know all the optimization methods that exist in Maple (neither in the DirectSearch free package nor in the GlobalOptimization Toolbox).
But a thing is for sure: there exist a large number of strategies (using derivatives or derivative-free) to solve optimization problems, and if it is so, it's because no method is universally better than another (there even exist a "Free Lunch Theorem" about this point).
Which means that without a concrete example no serious people will answer your question in a "general way". Best proof : your example in dimension 1000 can practically be solved by hand.
 

Great job Rouben !

The next challenge could be to compute some maximum stress in the beam and color this latter given the stress level ;-)

I thumb up

@radaar 
I'm not sure I really understand what you are looking for.
As I understand it practically all of it can be done without Maple (the only think you can't done by hand is to find all the zeroes of  x^2*A*cos(B*x) in a given real range). But nothing of what remains requires Maple.

Nevertheless I have written this worksheet to you.
Please look carefully to the last comment

Download opt.mw

@Carl Love 

Thanks Carl, I change it and modify my previous reply accordingly

@acer 

Oh, sorry, I verify this and reload it right now.
Maybe the reason was : (1) the error in the command plot(..., colorscheme=..., filled)  or  (2) the large number of polygons I construct (3) the fact I wanted to insert the full content and that I got an error message making the link itself corrupted
Anyway here is the file


PS: I'm very interested in your own work about shading polygons
 

restart:

# One can't use colorscheme and 'filled' at the same time as this error indicates
# to see the error uncomment the newt line

# plot(x*ln(x), x=0..1,thickness=3, numpoints=10, filled, colorscheme=["zgradient", ["Orange", "Red", "NavyBlue"]]);

# Here is a workaround
# Step 1 : capture the colors generated when the option 'colorscheme' is used
# Step 2 : capture the polygons generated when the option 'filled' is used
#
# cols contains the colors
# pols contains the polygons
#
# Step 3 agregate these informations to draw polygons with the desired colors
#        To do this the "big" polygon of 2*M+1 vertices is decomposed in M+1 vertical strips



# Step 1

ps   := plot(x*ln(x), x=0..1,thickness=3, numpoints=10, colorscheme=["zgradient", ["Orange", "Red", "NavyBlue"]]):
cols := op([1, 2], ps):              # returns the colors used
NC   := numelems(op(2, cols)[..,1]); # number of colors used

40

(1)

# Step 2

pf   := plot(x*ln(x), x=0..1, thickness=3, numpoints=10, filled):
pols := op([2, 1], pf):  # returns the filled polygon
np   := numelems(pols);  # number of vertices of the polygon

79

(2)

# Color Interpolation Procedure
# This procedure interpolates the color of vertical strip n from colors in cols

NP  := (np-1)/2+1;
CIP := proc(n) # Color Interpolation Procedure
  local m, i, c1, c2:
  m  := 1 + (NC-1) / (NP-1) * (n-1);
  i  := floor(m);
  c1 := op(2, cols)[i  ,..];
  c2 := op(2, cols)[i+1,..];
  return c1 *~ (i+1-m) +~ c2 *~ (m-i)
end proc:

40

(3)

# Step 3

new_pols := seq (
                 POLYGONS(
                           [pols[n], pols[n+1], [pols[n+1][1], 0], [pols[n][1], 0]],
                           COLOR(RGB, CIP(n)),
                           STYLE(PATCHNOGRID)
                 ),
                 n=1..NP-1
            ):

plots:-display(
  plot(x*ln(x), x=0..1,thickness=3, numpoints=10, colorscheme=["zgradient", ["Orange", "Red", "NavyBlue"]]),
  PLOT(new_pols)
)

 


 

Download filledcolorscheme.mw
 

@anthonyfl  @acer

Unfortunately the options 'filled' and 'colorscheme' are not compatible.
Here is a workaround to 'fill' the plot according to the colors correspponding to 'colorscheme'.


Download filled+colorscheme.mw



 

First 107 108 109 110 111 112 113 Last Page 109 of 154