Get values of time series with Julia-API
Hello,
with the gmsh.jl API I'm trying to receive the results (all the steps) of an electric machine simulation in the time domain (similar to the pmsm.pro example). I set up the communication with Julia so far and I'm able to run the FEM calculation.
gmsh.initialize()
c = gmsh.onelab
path = "./"
machine = "machine_model"
machine_geo = path * machine * ".geo"
machine_msh = path * machine * ".msh"
machine_pro = path * machine * ".pro"
mygetdp = gmsh.option.getString("Solver.Executable0")
Id = [-100]
c.setNumber("Input/50Id stator current", Id)
c.run("ID_" * string(Int(Id)), mygetdp * " " * machine_pro * " -msh "
* machine_msh * " -solve -v 0 -setnumber Flag_PrintFields 0")
torque = c.getNumber("Output - Mechanics/0Torque [Nm]/rotor")
The problem is, that I get only the result of last time step, although the simulation is in the time domain. I also tried c.get()
, but then I have to parse with JSON, which is much slower. In the electric machine template "machine_magstadyn_a.pro" I didn't figure it out, how I can use the SendToServer
command without the option LastTimeStepOnly
.
Is there a possibility to receive the vector of a parameter over all time steps of the simulation?
Best regards, Gerold