MultiBondLib.Compositions

MultiBond Graphic elements to join, split, reorder or convert MultiBonds

MultiBondLib.Compositions.Composition MultiBondLib.Compositions.PermutMultiBond MultiBondLib.Compositions.FromMultiBond MultiBondLib.Compositions.ToMultiBond

Information


This package contains models to compose, decompose, permute or convert multibonds.

Multibonds can be joined or split by the usage of the Composition element.

The order of the single bonds within a multibond can be changed by the element PermutMultiBond.

The models FromMultiBond and ToMultiBond are an interface to the classic BondLib.

NameDescription
Composition bondgraphic element to compose / decompose multibonds
PermutMultiBond permuts the order of a multibond
FromMultiBond converter bond: converts a 1-multibond to a simple bond
ToMultiBond converter bond: converts a simple bond to a 1-multibond


MultiBondLib.Compositions.Composition MultiBondLib.Compositions.Composition

bondgraphic element to compose / decompose multibonds

MultiBondLib.Compositions.Composition

Information


This model enables the composition (or decomposition respectively) of multibonds.

The two multibonds at connector A and B with cardinalities nA and nB are merged to a multibond of cardinality nA+nB, so that the first vector nA elements are equivalent to the multibond at connector A and the other ones are equal to the multibond at connector B.

Because this is an acausal element, it can also be used to decompose multibonds.


Parameters

NameDefaultDescription
nANCardinality of upper Bond connection
nBNCardinality of lower Bond connection

Modelica definition

model Composition 
  "bondgraphic element to compose / decompose multibonds" 
  final parameter Integer N = MBG_defaults.n;
  parameter Integer nA=N "Cardinality of upper Bond connection";
  parameter Integer nB=N "Cardinality of lower Bond connection";
  
  Interfaces.MultiBondCon MultiBondCon1(n=nA);
  Interfaces.MultiBondCon MultiBondCon2(n=nB);
  Interfaces.MultiBondCon MultiBondCon3(n=nA+nB);
protected 
  outer Defaults MBG_defaults;
equation 
  MultiBondCon3.e[1:nA] = MultiBondCon1.e;
  MultiBondCon3.f[1:nA]*MultiBondCon3.d = -MultiBondCon1.f*MultiBondCon1.d;
  MultiBondCon3.e[(nA+1):(nA+nB)] = MultiBondCon2.e;
  MultiBondCon3.f[(nA+1):(nA+nB)]*MultiBondCon3.d = -MultiBondCon2.f*MultiBondCon2.d;
end Composition;

MultiBondLib.Compositions.PermutMultiBond MultiBondLib.Compositions.PermutMultiBond

permuts the order of a multibond

MultiBondLib.Compositions.PermutMultiBond

Information


This model permutes the vectors of effort and flow.

The permutation is fully specified by permutation vector p of size n, where n is the cardinality of the permutation bond.


Parameters

NameDefaultDescription
nNCardinality of Bond
p[n]{1}permutation vector (contains all Integers in 1:n)

Modelica definition

model PermutMultiBond "permuts the order of a multibond" 
  final parameter Integer N = MBG_defaults.n;
  parameter Integer n = N "Cardinality of Bond";
  parameter Integer p[n] = {1} 
    "permutation vector (contains all Integers in 1:n)";
  Interfaces.MultiBondCon MultiBondCon1(n=n);
  Interfaces.MultiBondCon MultiBondCon2(n=n);
protected 
  outer Defaults MBG_defaults;
equation 
  MultiBondCon2.e =   MultiBondCon1.e[p];
  MultiBondCon2.f =   MultiBondCon1.f[p];
  MultiBondCon1.d =   -1;
  MultiBondCon2.d =  +1;
end PermutMultiBond;

MultiBondLib.Compositions.FromMultiBond MultiBondLib.Compositions.FromMultiBond

converter bond: converts a 1-multibond to a simple bond

MultiBondLib.Compositions.FromMultiBond

Information


This bond is a multibond of cardinality 1 at the tail and a classic single bond at the head.

This bond is an interface to the classic bondgraphic connectors of the BondLib.


Modelica definition

model FromMultiBond 
  "converter bond: converts a 1-multibond to a simple bond" 
  Interfaces.MultiBondCon MultiBondCon1(n=1);
  BondLib.Interfaces.BondCon BondCon1;
equation 
  BondCon1.e =   MultiBondCon1.e[1];
  BondCon1.f =   MultiBondCon1.f[1];
  BondCon1.d =   +1;
  MultiBondCon1.d =  -1;
end FromMultiBond;

MultiBondLib.Compositions.ToMultiBond MultiBondLib.Compositions.ToMultiBond

converter bond: converts a simple bond to a 1-multibond

MultiBondLib.Compositions.ToMultiBond

Information


This bond is a multibond of cardinality 1 at the head and a classic single bond at the tail.

This bond is an interface to the classic bondgraphic connectors of the BondLib.


Modelica definition

model ToMultiBond 
  "converter bond: converts a simple bond to a 1-multibond" 
  Interfaces.MultiBondCon MultiBondCon1(n=1);
  BondLib.Interfaces.BondCon BondCon1;
equation 
  BondCon1.e =   MultiBondCon1.e[1];
  BondCon1.f =   MultiBondCon1.f[1];
  BondCon1.d =   -1;
  MultiBondCon1.d =  +1;
end ToMultiBond;

HTML-documentation generated by Dymola Thu Feb 23 12:19:30 2006.