Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Help with OpenModelica error message

Help with OpenModelica error message

Hi - I'm trying to develop a simple model in OpenModelica. I'm trying to apply a constant force (using the const block with k = {1000.0,0.0,0.0}) to a World Force block. The a-frame of the World Force block is connected to the b-frame of a rigid body (using bodyshape block). Upon attempting to simulate, I get the error message: "Type mismatch in binding k = {1000.0, 0.0, 0.0}, expected subtype of Real(start=1.0), got type Real[3]. The model is attached. Can anybody please give me some guidance on how to correct this error.


WEC1.mo

Thankyou.

Re: Help with OpenModelica error message

Hi,

k is a scalar Real, {1000.0,0.0,0.0} is an array of type Real[3], so the types don't match. You need to give k a scalar binding, like k = 1000.0.

Re: Help with OpenModelica error message

Thankyou. That solved the problem.

There are 0 guests and 0 other users also viewing this topic
You are here: