–#model 0 0 library_path 'm:\bond graph'; type Mainmodel end; implementation bg submodels omega_entree 285 292.5 library_path 'Bond Graph'; knot OneJunction ports power knot duplicatable none p [1]; signal knot out flow [1]; restrictions causality constraint one_out p; end; icon bg bottom figures text '1' 285 292.5 18 bold; end; implementation eq equations sum (direct (p.e)) = 0; equal (collect (p.f)); flow = first (p.f); implementation_end; inertie_entree 285 195 library_path 'Bond Graph'; type I ports power in p; signal out state; restrictions causality preferred in p; parameters real i = 0.2265; end; icon bg right figures text 'I' 285 195 18 bold; end; implementation eq equations state = int(p.e); p.f = state / i; implementation_end; rapport_entree 367.5 292.5 library_path 'Bond Graph'; type TF ports power in p1; power out p2; restrictions causality constraint not_equal p1 p2; parameters real r = 0.25641; end; icon bg bottom figures text 'TF' 367.5 292.5 18 bold; end; implementation eq equations p1.e = r * p2.e; p2.f = r * p1.f; implementation_end; omega_boitier 450 292.5 library_path 'Bond Graph'; knot OneJunction ports power knot duplicatable none p [1]; signal knot out flow [1]; restrictions causality constraint one_out p; end; icon bg bottom figures text '1' 450 292.5 18 bold; end; implementation eq equations sum (direct (p.e)) = 0; equal (collect (p.f)); flow = first (p.f); implementation_end; ZeroJunction1 555 225 library_path 'Bond Graph'; knot ZeroJunction ports power knot duplicatable none p [1]; signal knot out effort [1]; restrictions causality constraint one_in p; end; icon bg figures text '0' 555 225 18 bold; end; implementation eq equations sum (direct (p.f)) = 0; equal (collect (p.e)); effort = first (p.e); implementation_end; ZeroJunction2 585 292.5 library_path 'Bond Graph'; knot ZeroJunction ports power knot duplicatable none p [1]; signal knot out effort [1]; restrictions causality constraint one_in p; end; icon bg figures text '0' 585 292.5 18 bold; end; implementation eq equations sum (direct (p.f)) = 0; equal (collect (p.e)); effort = first (p.e); implementation_end; omega_roue_d 705 337.5 library_path 'Bond Graph'; knot OneJunction ports power knot duplicatable none p [1]; signal knot out flow [1]; restrictions causality constraint one_out p; end; icon bg bottom figures text '1' 705 337.5 18 bold; end; implementation eq equations sum (direct (p.e)) = 0; equal (collect (p.f)); flow = first (p.f); implementation_end; ZeroJunction3 772.5 240 library_path 'Bond Graph'; knot ZeroJunction ports power knot duplicatable none p [1]; signal knot out effort [1]; restrictions causality constraint one_in p; end; icon bg figures text '0' 772.5 240 18 bold; end; implementation eq equations sum (direct (p.f)) = 0; equal (collect (p.e)); effort = first (p.e); implementation_end; ZeroJunction4 555 360 library_path 'Bond Graph'; knot ZeroJunction ports power knot duplicatable none p [1]; signal knot out effort [1]; restrictions causality constraint one_in p; end; icon bg figures text '0' 555 360 18 bold; end; implementation eq equations sum (direct (p.f)) = 0; equal (collect (p.e)); effort = first (p.e); implementation_end; roue_d 840 337.5 library_path 'Bond Graph'; type R ports power in p; parameters real r = 0.00000001; end; icon bg bottom figures text 'R' 840 337.5 18 bold; end; implementation eq equations p.e = r * p.f; implementation_end; frottement_disques_g 555 150 library_path 'Bond Graph'; type R ports power in p; parameters real r = 1.0; end; icon bg right figures text 'R' 555 150 18 bold; end; implementation eq equations p.e = r * p.f; implementation_end; C1 772.5 172.5 library_path 'Bond Graph'; type C ports power in p; signal out state; restrictions causality preferred out p; parameters real c = 0.000234477; end; icon bg right figures text 'C' 772.5 172.5 18 bold; end; implementation eq equations state = int(p.f); p.e = state / c; implementation_end; C2 772.5 405 library_path 'Bond Graph'; type C ports power in p; signal out state; restrictions causality preferred out p; parameters real c = 0.0001464086; end; icon bg right figures text 'C' 772.5 405 18 bold; end; implementation eq equations state = int(p.f); p.e = state / c; implementation_end; deux 517.5 292.5 library_path 'Bond Graph'; type TF ports power in p1; power out p2; restrictions causality constraint not_equal p1 p2; parameters real r = 2.0; end; icon bg bottom figures text 'TF' 517.5 292.5 18 bold; end; implementation eq equations p1.e = r * p2.e; p2.f = r * p1.f; implementation_end; frottement_disques_d 555 427.5 library_path 'Bond Graph'; type R ports power in p; parameters real r = 1.0; end; icon bg right figures text 'R' 555 427.5 18 bold; end; implementation eq equations p.e = r * p.f; implementation_end; roue_g 832.5 240 library_path 'Bond Graph'; type R ports power in p; parameters real r = 250.0; end; icon bg bottom figures text 'R' 832.5 240 18 bold; end; implementation eq equations p.e = r * p.f; implementation_end; ZeroJunction5 772.5 337.5 library_path 'Bond Graph'; knot ZeroJunction ports power knot duplicatable none p [1]; signal knot out effort [1]; restrictions causality constraint one_in p; end; icon bg figures text '0' 772.5 337.5 18 bold; end; implementation eq equations sum (direct (p.f)) = 0; equal (collect (p.e)); effort = first (p.e); implementation_end; omega_roue_g 705 240 library_path 'Bond Graph'; knot OneJunction ports power knot duplicatable none p [1]; signal knot out flow [1]; restrictions causality constraint one_out p; end; icon bg bottom figures text '1' 705 240 18 bold; end; implementation eq equations sum (direct (p.e)) = 0; equal (collect (p.f)); flow = first (p.f); implementation_end; MSe1 210 292.5 library_path 'Bond Graph'; type MSe ports power out p; signal in effort; restrictions causality fixed out p; end; icon bg figures text 'MSe' 210 292.5 18 bold; end; implementation eq variables real flow; equations p.e = effort; flow = p.f; implementation_end; entree 127.5 292.5 library_path 'Signal\Sources'; type 'SignalGenerator-Step' ports signal out output; parameters real start_time = 0.0 {s}; end; icon bg bottom figures group rectangle 112.5 277.5 142.5 307.5 fill 15132390; line 121.5 289.5 137.4 289.5 color 16711680 width 2; line 115.2 300 139.8 300; line 117.3 300.1 121.6 300.1 121.6 289.4 color 16711680 width 2; line 117.3 285 117.3 302.1; end; end; implementation eq parameters real amplitude = 100.0 {}; variables boolean hidden change; equations "calculate at least at the start time" change = timeevent (start_time); "calculate the step signal" output = amplitude * step (start_time); implementation_end; end; connections omega_entree\p => inertie_entree\p; omega_entree\p => rapport_entree\p1; rapport_entree\p2 => omega_boitier\p; omega_boitier\p => deux\p1; deux\p2 => ZeroJunction2\p; omega_boitier\p => ZeroJunction1\p 495 225; ZeroJunction1\p => frottement_disques_g\p; ZeroJunction1\p => omega_roue_g\p 675 225; ZeroJunction2\p => omega_roue_g\p 630 240; omega_roue_g\p => ZeroJunction3\p; ZeroJunction3\p => C1\p; ZeroJunction3\p => roue_g\p; ZeroJunction2\p => omega_roue_d\p 630 337.5; omega_boitier\p => ZeroJunction4\p 495 360; ZeroJunction4\p => frottement_disques_d\p; ZeroJunction4\p => omega_roue_d\p 675 360; omega_roue_d\p => ZeroJunction5\p; ZeroJunction5\p => C2\p; ZeroJunction5\p => roue_d\p; MSe1\p => omega_entree\p; entree\output -> MSe1\effort; end; implementation_end;