- Index
- » Programming
- » Modelica Language
- » Help with OpenModelica error message
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.
- perost
- 114 Posts
- Index
- » Programming
- » Modelica Language
- » Help with OpenModelica error message