I have converted a Python function to Julia which involves:
- kwargs to specify units, correlations, etc.
- unit conversion
- solving an implicit equation
My Julia conversion works, but I’m thinking of converting the function to ModelingToolkit and using NonlinearSolve (with AD). The example of this in MTK (steady solution of Lorentz equation) is fine, but doesn’t use things like @mtkmodel, etc.
- Is it possible to build a somewhat more complex model using @mtkmodel? Can I use @structural_parameters, @components, etc. inside the re-usable function?
- Is there an example of how to do this? [In particular, to indicate that it is a nonlinear equation, and not a dynamic system.]