- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Creating a model similar to...
Creating a model similar to Multibody.World
Creating a model similar to Multibody.World
Hi,
I wanted to recreate the DCMotor model available in OMNotebook with one small change. I want to make the ground model similar to the Multibody.World model. i.e. it should be enough only if i drag and drop a ground component into the view. No need of connecting it.
For this, I made the ground component as an inner model by changing it in the annotation.
Code:
model Ground
Interfaces.Pin_a p ;
equation
p.v = 0;
annotation(defaultComponentName = "ground", defaultComponentPrefixes = "inner");
end Ground;
Then I gave a reference to this ground model in the voltage, emf, resistor and inductor components by
Code:
outer Ground ground;
But when i try to simulate the model, I get an error stating that Circular Equalities are detected. (This error comes in the normal DCMotor model when there is no ground component present.)
Can someone please tell me where I went wrong?
Regards,
Sanjay
Re: Creating a model similar to Multibody.World
OpenModelica does not (yet) add automatically and inner component. You have to add the inner component yourself in the top model!
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Creating a model similar to Multibody.World
When you drag & drop the Ground model into DCMotor it should become,
Code:
inner Ground ground;
The top model Adrian is referring to is DCMotor.
Adeel.
- adeas
- 454 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Creating a model similar to...