Hi,
Is it possible to create a global scalar variable from scalars computed in other solvers within SIF without programming ?
E.g. I want to create a variable Torque from "res: air gap torque" created by the MagnetoDynamics2D solver. Later I would use this Torque variable together with ODESolver to estimate speed knowing the inertia J of the rotor (J*w'=Torque).
In the SaveData SaveScalars solver there is functionality to save certain data by "Variable i String" and then place it as a proper variable "Target Variable i String". However with this approach I can not get access to the "res: air gap torque".
BR, Pavel
Variable from lumped scalars
-
- Site Admin
- Posts: 4827
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Variable from lumped scalars
Hi Pavel
Basically this should be possible. However, the problem is that the number related to this scalar may vary depending on what else is done. Therefore I would rather edit the MadgentoDynamics2D directly and add there something like
Then you can access this by
and in sif files say
I think that the end results would be prettier with these choices.
-Peter
Basically this should be possible. However, the problem is that the number related to this scalar may vary depending on what else is done. Therefore I would rather edit the MadgentoDynamics2D directly and add there something like
Code: Select all
CALL DefaultVariableAdd("air gap torque",Global=.TRUE.,InitValue=Torque)
Code: Select all
Var => DefaultVariableGet("air gap torque")
Torque = Var % Values(1)
Code: Select all
Expression = Variable "air gap torque"
Real MATC "1.23*tx"
-Peter