You can address both issues with ChFunction objects.

  *   For your first question, use a ChFunctionSequence which allows you to 
stitch together several functions.  You can start with a constant zero function 
and then the sinusoidal. Alternatively, simply implement a custom function (by 
deriving from ChFunction and implementing the GetVal() method).  You can see 
examples of both in demo_CH_functions.
  *   The second one is not really a Chrono question.  You collect and manage 
simulation data however you want. You can use a CSV file (there’s simple 
support in Chrono for that through the utils::ChWriterCSV class). Or else you 
can use a ChFunctionInterp to collect data points during the simulation loop. 
Search through Chrono demos for uses of either of these. Or anything else you 
want – you have full control to extract whatever data you want during the 
simulation loop and log it however you want.  You do not need the 
Chrono::Postprocess module for any of this.
--Radu

From: [email protected] <[email protected]> On Behalf 
Of Alessio
Sent: Friday, June 21, 2024 3:01 PM
To: ProjectChrono <[email protected]>
Subject: Re: [chrono] Implementation of a vibrating system

Hello,
thank you so much for the help, in the end I opted for the implementation via 
the earthquake demo and it seems to work.

I have a few more questions:

  *   I need to not start the sinusoidal pulse immediately at the beginning of 
the simulation but instead I would like the particles to have a certain 
settling time before they start oscillating, how could I do this? I've found 
something about ChFunction commands but I'm not sure how to go about it.
  *   Then I'd like to analyze the ascent of a specific particle that I define 
as an intruder, I'd need an array of data about its height relative to the 
reference plane over time so that I can then plot it as various physical 
parameters change. For this purpose I thought of defining a .csv file to 
collect the data but I am not sure how to include it in the simulation loop. Is 
there a better method for doing this? Is there a need for the postprocessing 
module?
I enclose a copy of my script if it can be useful.
Thank you in advance.

~Alessio
Il giorno venerdì 14 giugno 2024 alle 16:36:57 UTC+2 Radu Serban ha scritto:
You can use a linear motor with whatever activation function you want (at 
position, velocity, or force level).  See demo_MBS_motors for examples.  
Alternatively, you can use a weld joint (ChLinkLockLock) which allows 
specifying a motion function along one of the constrained DOFs.  See 
demo_MBS_earthquake.
In either case, you would connect one of the “links” above between the box and 
the fixed ground body.

--Radu

From: [email protected] <[email protected]> On Behalf Of 
Alessio
Sent: Friday, June 14, 2024 9:03 AM
To: ProjectChrono <[email protected]>
Subject: [chrono] Implementation of a vibrating system

Hello everyone,

I'm trying to simulate the behaviour of different non-spherical particles under 
varying gravity and some physical parameters like friction and restitution 
coefficients. I've modelled an open cubic container for the particles which 
rests on a reference floor which is fixed. I should now implement horizontal 
oscillations, in particular I was thinking about sinusoidal inputs. What could 
be the best way to do it? I was thinking of implementing an engine or a 
prismatic link to which the sinusoidal forcing is added, but I'm not sure if 
these are the best choices, as I am new to using Chrono. Also, I am undecided 
whether to make the reference floor move and then vibrate the box or to 
implement it directly on it, depending on which is the easiest way.

Thanks to anyone who can give me some advice.
--
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/2ca55747-33ae-4943-884b-29946a3430a5n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/2ca55747-33ae-4943-884b-29946a3430a5n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!Ik1vQnrkR3RzjC9YLd42xcxafm2q5_1GWpjPZ2bHbDXwlQ7XmFzXdIQVaKIO-p9lTYDbAGcFO19zBddc3hzu_mHDXg$>.
--
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/a6733f1f-645c-4047-8d2c-0a09e46db5c0n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/a6733f1f-645c-4047-8d2c-0a09e46db5c0n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!Ny4hZ4nvyr_KHZe9kxTjcsep2mrfBmQCHaV-3VpQ8u3a1pQdlf3b23kB6FuZj1j5EaEnzAYhvUwu1xhfXq-kWkaw2Q$>.

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/CH3PPF46CDC2185D11E66FD650C96C9DB57A7D72%40CH3PPF46CDC2185.namprd06.prod.outlook.com.

Reply via email to