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

Partial class error

Partial class error

Hello ,

I'm a begginer in om edit and I'm curently using OpenHydraulics Librairy.

When I try to simulate my model there is this error :
[1] 10:04:33 Traduction Avertissement
[OpenHydraulics.Interfaces.PartialFluidComponent: 5:3-6:93]: No corresponding 'inner' declaration found for component .OpenHydraulics.Fluids.BaseClasses.PartialFluid accu_6C0.oil declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: OpenHydraulics.Components.Volumes.Accumulator$accu_6C0.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

[2] 10:04:33 Traduction Erreur
[OpenHydraulics.Fluids.BaseClasses.PartialFluid: 2:1-64:17]: Illegal to instantiate partial class PartialFluid.

[3] 10:04:33 Traduction Erreur
Error occurred while flattening model Mise_en_charge



I don't put every parameter but i understand the librairy ParatialFluid isn't configured even if idon't use it.

I put my model on the attachments in case of there is others questions.

Thank you for your help
Load-control.mo

Attachments:

Re: Partial class error

Hi Emma,

I'm not a user of OpenHydraulics myself. But looking through your model you need to make at least two modifications:

1) you have connected port_b of VariableFlow1 to flange_a of  Cylinder_6M1. You should connect it to the hydraulics port instead.
2) your model extends from PartialFluid. You should instead extend from PartialFluidCircuit and redeclare the oil model. That is: replace the line

"extends OpenHydraulics.Fluids.BaseClasses.PartialFluid"

with

"extends OpenHydraulics.Interfaces.PartialFluidCircuit(redeclare OpenHydraulics.Fluids.GenericOilSimple oil);"

Best regards,
Rene Just Nielsen

Re: Partial class error

Thank you very much, it works!

There are 0 guests and 0 other users also viewing this topic