Replies: 1 comment
-
|
Just spotted this in the examples pump_head = solver.settings.setup.named_expressions.create("head")
pump_head.definition = "(({p-out} - {p-in}) / (998.2 [kg/m^3] * 9.81[m/s^2]))"
pump_head.output_parameter = True
###################################
# Define Report Definitions
# =================================
monitor = Monitor(solver)
report_definitions = ReportDefinitions(solver)
# Create a report definition
# p-out
outlet_pressure_report_def = report_definitions.surface.create("p-out")
outlet_pressure_report_def.report_type = "surface-massavg"
...
# p-in
inlet_pressure_report_def = report_definitions.surface.create("p-in")Might not even need a callback scope in some situations ###################################
# Define Report Definitions
# =================================
monitor = Monitor(solver)
report_definitions = ReportDefinitions(solver)
# Create a report definition
# p-out
p_out = report_definitions.surface.create("p-out")
p_out.report_type = "surface-massavg"
...
# p-in
p_in = report_definitions.surface.create("p-in")
pump_head = solver.settings.setup.named_expressions.create("head")
pump_head.definition = (p_out - p_in) / (998.2 kg * m**-3 * 9.81 * m * s**-2))"
pump_head.output_parameter = True |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
📝 Description of the feature
Currently reals are typed as str | float. Initially when reading that I thought it might be a bug but I later remembered the existence of the constants you can enter.
I think the ideal solution from a typing perspective is to have a callback scope that produces the expression though I think that'd be very challenging to implement especially with all the binops and whatnot you'd need to support
💡 Steps for implementing the feature
I would imagine a lot of this needs autogenerating based on the version which will make things very challenging.
🔗 Useful links and references
No response
Beta Was this translation helpful? Give feedback.
All reactions