Working With the Model After the Cosimulation
Once you have performed the solution in Simulink, you may want to postprocess the solution of the full COMSOL model and not only on the variables you have access to from the Simulink diagram.
After the Simulink simulation is completed the model used for the cosimulation is still loaded on the COMSOL Multiphysics Server. You can launch the COMSOL Desktop from MATLAB to view and postprocess the model.
1
2
At the MATLAB prompt enter mphlaunch to launch the COMSOL Desktop that automatically loads the model object from the COMSOL Multiphysics server.
Note: By default the model is loaded every time you run a simulation, so the modification you make to the model in the COMSOL Desktop will not affect the Simulink simulation unless you have saved the model MPH file.
Continue in the COMSOL Desktop and plot the tip displacement.
3
Note: If you plan to run a new Simulink simulation with the current model, it is recommended that you close the COMSOL Desktop first. Closing COMSOL Desktop leads to a smoother and often faster cosimulation.