Drasil icon indicating copy to clipboard operation
Drasil copied to clipboard

SglPend's inputs/outputs

Open balacij opened this issue 3 months ago • 1 comments

According to the single goal of SglPend, the objective is to observe the motion of a single pendulum.

Image

However, that doesn't quite mean anything (at least to me). The document doesn't mention any sort of friction, so I believe the single pendulum would oscillate indefinitely (?). Does this mean that for a finite time period, the goal of SglPend is to output the angle of displacement over the time period?

According to the Output-Values FR:

Image

The goal of SglPend is to output the length of the rod. This is obviously wrong. However, this is also in direct conflict with what we designate as the inputs and outputs:

inputs :: [DefinedQuantityDict]
inputs = map dqdWr [lenRod, QPP.mass, QP.angularAccel, pendDisplacementAngle, initialPendAngle]

outputs :: [DefinedQuantityDict]
outputs = [dqdWr pendDisplacementAngle]

The length of the rod should purely be an input, as is designated by the table of inputs:

Image

Finally, the IM that the Output-Values FR references is as follows:

Image

The IM provides a formula for a function.

So, now the question is, what should SglPend be outputting?

balacij avatar Oct 07 '25 22:10 balacij

The input should be pendInitDisplacementAngle, i.e. $\theta_i$ and not $\theta_p$. The output is supposed to be 'a function' (of time). Not entirely obvious how to represent that, though I do believe that we do it in other cases (i.e. that is also the output of an ODE solver).

And yes, this is somewhat silly since the output is merely a shifted, scaled cosine. Nevertheless, we should be able to go from trivial to very complex. So this is a good one to get working.

JacquesCarette avatar Oct 08 '25 15:10 JacquesCarette