C_R

3577 Reputation

21 Badges

6 years, 96 days

MaplePrimes Activity


These are replies submitted by C_R

@mmcdara 
That's a good point. I did not check energy this time because I have done such checks on several occasions and gained confidence in MapleSim for simulations of this type (here is, for example, a cross-check with a simulation from Ruben Rostamian).  

A quick check from a side view (from behind) shows a tiny loss of potential energy. The apex of the incomming branch is a bit higher. I should have stopped the amination at the same height of the initial condition to avoid the impression of contact to ground.

 

 

Are there any assumptions under which the condition "must be zero"? Your pde still contains allot of parameters that can be complex and Maple cannot simplify to zero. Perhaps of missing assumptions or the simple reason that the pde is too complex.
At least Maple confirms that under certain conditions the pde is true

coulditbe(subs(G1,pde2)=0)
                              true

@mmcdara 

I tought about generating a list of all user defined names. For that a worksheet could be saved and then scanned statement by statement for names in any expression and arguments of procedures/functions. All scanns are merged in a set using union.
This set could be reduced by anames ('user').

This seems to work in principle. However, the indets command I used 

line := " ":
while line <> 0 do
   nm:=indets(parse(readline("input.mpl")),name);
   user_names:=user_names union nm;
end do:
user_names;

is not specific ennough. It captures names but also all other sort of things:


{a, aaa, b, c, false, ln, name, restart, string, user, x}
 

@mmcdara 

Thanks for confirming that my attempt was hopeless. The same seems to be true for anames ()

restart;
anames():
inital_names:={%}:
{anames()} minus inital_names;
anames(`user`)
     {Unit, Units, sprintf, value, _UIUtils, inital_names, 

       debugger/known_lineinfo, debugger/no_output}


                          inital_names

The kernel seems to establish a separate list for assigned user-defined names which is accessible via anames('user').

@nm 
assigned is of course usefull for a particular name that is known. However, often not all names that are defined in a worksheet are known.

I am looking for a kind of unames('user') command that lists all unassigned names that a user has defined. Not all unassigned names the kernel knows. The opposite can be done in with anames( 'user' ): Listing all assigned names a user has defined.

By the way: I did not know the assigned command. The anames and unames help pages, that I new, do not link to the assigned page. On the other hand, the assinged help page links to unames and anames.

@Gabriel Barcellos 

Yes there is.

In the attachment I simplified the "variant" which contained alot of code elements only required to get a formating similar to Rouben Rostamian. The simplified lists needed to be reordered for plotting. This back an forth is a bit unnecessary to generate plot lists.

If you are only interested in point plots, I would put an fsolve statement (to solve for m) and eqG (to compute G) into a time loop and generate all plot points of interest at each time step.

plot_lists.mw

The problem is the Heavyside function which is not contineous. This is a challenge for solvers using the first derivative.
In this case you either use a solver that works with the heavyside function (I don't know one) or you solve for subdomains
 

evalf(subs(Heaviside(_Z - 1433/20)=1,yB_(10)))
                          64.95141449

The above does not work for
 

evalf(subs(Heaviside(_Z - 1433/20)=0,yB_(10)))

It's probably because of the arctan function that has infinite roots (which can be complex) and which is not contineous either. The domain must be restricted again.

 

@Carl Love 

I did not know that a Matrix is also an expression (parameter x of seq).

The evalapply application is something I missed completely. ?evalapply would have been helpfull when I tried to understand the ()() construct. It seems to be impossible to find this help page with a search term. "{" and "[" direct in the right direction but there is nothing for "(" from where a "See Also" could link to pages dealing with function application or round brakets/parentheses. These brackets play an important role in Maple Language but somehow do not seem to fit under the help topics.   

Thank you

@Carl Love 

Interesting way. Is that explained on ?seq or elsewhere?

@acer

On the search for easier ways, I was wondering if a recursive expand could make sense. Something like

expand['recurse'](expr)

Similar to eval['recurse'].

(I would prefer expand because it is more specific than simplify.)

op, with all its drawbacks, is at least easy to get something done and easy to remember.

@grompvevo 

I do not get the error with Maple 2024.1. Which version of Maple do you use?

I would be interested in the invariant you intend to use to test solutions. The invariant could be used to test the symbolic solution below as well

pdsolve({pde, v(a, t) = 0, v(b, t) = 0, v(x, 0) = f(x + 5), D[2](v)(x, 0) = -eval(diff(f(x), x), x = x + 5)})

You could of course use this solution, which is independed from any physical context, for tests as well.

@Christopher2222 

Correct. Probes could be a way to plot variables over time. However:

Probes connect to ports of components. In the case of  a sphere contact only two variables are exportet: dummy (which gives an error) and R which is the radius of the sphere.

But probes are only for plotting. If forces are used for computations within the model (e.g. for a controller) they must be  measured. For such purposes special measuring componets are available but they are not compatible with the ports of a contact element.

The model tree provides an overwelming number of parameters and variables for a contact element but I have not clue how to access this programatically (and what these parameters and variables stand for).

 

@imparter 

Not that I know. I tried a few things using right click.

@acer Got it. Thank you!

I had the idea to plot an array inside an array that contains the caption. plots:-display does not allow this.
The best I can think of in keeping a caption and a plot array together is using a table.

Is that an option for you?


Unfortuneately such a table cannot be exported as jpg.

Looks like that you ask for a missing feature.

plot_array_with_caption.mw

First 18 19 20 21 22 23 24 Last Page 20 of 70