# dynamical systems process = FirstOrderLinearDS(x0, A) myProcessRelation = ZhuravlevTwistingR(C,B) myNslaw = RelayNSL(2) myNslaw.display() myProcessInteraction = Interaction(ninter, myNslaw, myProcessRelation) myNSDS = NonSmoothDynamicalSystem() myNSDS.insertDynamicalSystem(process) myNSDS.link(myProcessInteraction,process) filippov = Model(t0,T) filippov.setNonSmoothDynamicalSystemPtr(myNSDS) td = TimeDiscretisation(t0, h) s = TimeStepping(td) myIntegrator = EulerMoreauOSI(process, theta) s.insertIntegrator(myIntegrator) #TODO python <- SICONOS_RELAY_LEMKE # access dparam osnspb = Relay() s.insertNonSmoothProblem(osnspb) s.setComputeResiduY(True) s.setComputeResiduR(True)
# dynamical systems process = FirstOrderLinearDS(x0, A) myProcessRelation = ZhuravlevTwistingR(C,B) myNslaw = RelayNSL(2) myNslaw.display() myProcessInteraction = Interaction(ninter, myNslaw, myProcessRelation) myNSDS = NonSmoothDynamicalSystem() myNSDS.insertDynamicalSystem(process) myNSDS.link(myProcessInteraction,process) filippov = Model(t0,T) filippov.setNonSmoothDynamicalSystemPtr(myNSDS) td = TimeDiscretisation(t0, h) s = TimeStepping(td) myIntegrator = EulerMoreauOSI(theta) myIntegrator.insertDynamicalSystem(process) s.insertIntegrator(myIntegrator) #TODO python <- SICONOS_RELAY_LEMKE # access dparam osnspb = Relay() s.insertNonSmoothProblem(osnspb) s.setComputeResiduY(True)
# # Model # RelayOscillator=Model(t0,T,Modeltitle) # add the dynamical system in the non smooth dynamical system myNSDS = NonSmoothDynamicalSystem() myNSDS.insertDynamicalSystem(LSRelayOscillator) # link the interaction and the dynamical system myNSDS.link(InterRelayOscillator,LSRelayOscillator) RelayOscillator.setNonSmoothDynamicalSystemPtr(myNSDS) # # Simulation # # (1) OneStepIntegrators theta = 0.5 aOSI = EulerMoreauOSI(theta) aOSI.insertDynamicalSystem(LSRelayOscillator) # (2) Time discretisation aTiDisc = TimeDiscretisation(t0,h_step) # (3) Non smooth problem aRelay = Relay()
nslaw = RelayNSL(1) InterRelayOscillator = Interaction(nslaw, LTIRRelayOscillator) # # Model # RelayOscillator = Model(t0, T, Modeltitle) # add the dynamical system in the non smooth dynamical system myNSDS = NonSmoothDynamicalSystem() myNSDS.insertDynamicalSystem(LSRelayOscillator) # link the interaction and the dynamical system myNSDS.link(InterRelayOscillator, LSRelayOscillator) RelayOscillator.setNonSmoothDynamicalSystemPtr(myNSDS) # # Simulation # # (1) OneStepIntegrators theta = 0.5 aOSI = EulerMoreauOSI(theta) # (2) Time discretisation aTiDisc = TimeDiscretisation(t0, h_step) # (3) Non smooth problem aRelay = Relay() # (4) Simulation setup with (1) (2) (3)