From c7ca0d490589c467743620811b4f7085374dda52 Mon Sep 17 00:00:00 2001 From: TimSlendebroek <32385057+TimSlendebroek@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:57:55 -0700 Subject: [PATCH 1/3] add 3 fields realted to bop --- .../balance_of_plant.json | 30 +++++++++++++++++++ src/dd.jl | 8 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/data_dictionary/data_structures_extra/balance_of_plant.json b/data_dictionary/data_structures_extra/balance_of_plant.json index ddd3fc2..082bdc0 100644 --- a/data_dictionary/data_structures_extra/balance_of_plant.json +++ b/data_dictionary/data_structures_extra/balance_of_plant.json @@ -67,6 +67,26 @@ "type": "dynamic", "units": "W" }, + "balance_of_plant.power_plant.breeder_heat_load": { + "coordinates": [ + "balance_of_plant.time" + ], + "data_type": "FLT_1D", + "documentation": "The heat flow towards the breeder.", + "timebasepath": "/time", + "type": "dynamic", + "units": "W" + }, + "balance_of_plant.power_plant.divertor_heat_load": { + "coordinates": [ + "balance_of_plant.time" + ], + "data_type": "FLT_1D", + "documentation": "The heat flow towards the diverter", + "timebasepath": "/time", + "type": "dynamic", + "units": "W" + }, "balance_of_plant.power_plant.generator_conversion_efficiency": { "coordinates": [ "balance_of_plant.time" @@ -181,6 +201,16 @@ "type": "dynamic", "units": "W" }, + "balance_of_plant.power_plant.wall_heat_load": { + "coordinates": [ + "balance_of_plant.time" + ], + "data_type": "FLT_1D", + "documentation": "The heat flow towards the wall.", + "timebasepath": "/time", + "type": "dynamic", + "units": "W" + }, "balance_of_plant.thermal_efficiency_cycle": { "coordinates": [ "balance_of_plant.time" diff --git a/src/dd.jl b/src/dd.jl index 91f082a..da19b9c 100644 --- a/src/dd.jl +++ b/src/dd.jl @@ -94641,12 +94641,15 @@ end balance_of_plant__power_plant__system() = balance_of_plant__power_plant__system{Float64}() mutable struct balance_of_plant__power_plant{T} <: IDS{T} + var"breeder_heat_load" :: Vector{<:T} + var"divertor_heat_load" :: Vector{<:T} var"generator_conversion_efficiency" :: Vector{<:T} var"power_cycle_type" :: String var"power_electric_generated" :: Vector{<:T} var"system" :: IDSvector{balance_of_plant__power_plant__system{T}} var"total_heat_rejected" :: Vector{<:T} var"total_heat_supplied" :: Vector{<:T} + var"wall_heat_load" :: Vector{<:T} _filled::Set{Symbol} _frozen::Bool _in_expression::Vector{Symbol} @@ -94655,7 +94658,7 @@ mutable struct balance_of_plant__power_plant{T} <: IDS{T} end function balance_of_plant__power_plant{T}() where T - ids = balance_of_plant__power_plant{T}(T[], "", T[], IDSvector{balance_of_plant__power_plant__system{T}}(), T[], T[], Set{Symbol}(), false, Symbol[], nothing, WeakRef(nothing)) + ids = balance_of_plant__power_plant{T}(T[], T[], T[], "", T[], IDSvector{balance_of_plant__power_plant__system{T}}(), T[], T[], T[], Set{Symbol}(), false, Symbol[], nothing, WeakRef(nothing)) setfield!(ids.system, :_parent, WeakRef(ids)) return ids end @@ -96196,6 +96199,8 @@ const _all_info = Dict{String,Info}( "balance_of_plant.power_electric_plant_operation.system[:].subsystem[:].power" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "Electrical power used to operate the system", true), "balance_of_plant.power_electric_plant_operation.total_power" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "Total ", true), "balance_of_plant.power_plant" => Info{Tuple{}}((), "-", "STRUCTURE", "", true), +"balance_of_plant.power_plant.breeder_heat_load" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the breeder.", true), +"balance_of_plant.power_plant.divertor_heat_load" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the diverter", true), "balance_of_plant.power_plant.generator_conversion_efficiency" => Info{Tuple{String}}(("balance_of_plant.time",), "-", "FLT_1D", "Conversion efficiency of thermal to electric power of the steam cycle", true), "balance_of_plant.power_plant.power_cycle_type" => Info{Tuple{}}((), "-", "STR_0D", "Type of primary power cycle, :brayton = gas, :rankine = steam", true), "balance_of_plant.power_plant.power_electric_generated" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The net electric power produced by the thermal plant, equal tot the power produced by turbines LESS the power consumed by pumps and compressors", true), @@ -96214,6 +96219,7 @@ const _all_info = Dict{String,Info}( "balance_of_plant.power_plant.system[:].name" => Info{Tuple{}}((), "-", "STR_0D", "Name of the system", true), "balance_of_plant.power_plant.total_heat_rejected" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The total heat flow being rejected from the thermal plant", true), "balance_of_plant.power_plant.total_heat_supplied" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The total heat flow being supplied to the thermal Plant (Fusion thermal power).", true), +"balance_of_plant.power_plant.wall_heat_load" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the wall.", true), "balance_of_plant.thermal_efficiency_cycle" => Info{Tuple{String}}(("balance_of_plant.time",), "-", "FLT_1D", "The fractional thermal effiency of the power cycle. Calculated as 1-Q_out/Q_in", true), "balance_of_plant.thermal_efficiency_plant" => Info{Tuple{String}}(("balance_of_plant.time",), "-", "FLT_1D", "The fractional thermal effiency of the entire BOP thermal plant, inlcudes all of the individual cycles. Calculated as 1-Q_out/Q_in", true), "balance_of_plant.time" => Info{Tuple{String}}(("1...N",), "s", "FLT_1D", "Generic time", true), From cfd6ed01e8961fb91955e85010e401c663a72d5f Mon Sep 17 00:00:00 2001 From: TimSlendebroek <32385057+TimSlendebroek@users.noreply.github.com> Date: Tue, 24 Sep 2024 09:30:12 -0700 Subject: [PATCH 2/3] heat_load struct --- data_dictionary/data_structures_extra/balance_of_plant.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data_dictionary/data_structures_extra/balance_of_plant.json b/data_dictionary/data_structures_extra/balance_of_plant.json index 082bdc0..657553f 100644 --- a/data_dictionary/data_structures_extra/balance_of_plant.json +++ b/data_dictionary/data_structures_extra/balance_of_plant.json @@ -67,7 +67,7 @@ "type": "dynamic", "units": "W" }, - "balance_of_plant.power_plant.breeder_heat_load": { + "balance_of_plant.power_plant.heat_load.breeder": { "coordinates": [ "balance_of_plant.time" ], @@ -77,7 +77,7 @@ "type": "dynamic", "units": "W" }, - "balance_of_plant.power_plant.divertor_heat_load": { + "balance_of_plant.power_plant.heat_load.divertor": { "coordinates": [ "balance_of_plant.time" ], @@ -201,7 +201,7 @@ "type": "dynamic", "units": "W" }, - "balance_of_plant.power_plant.wall_heat_load": { + "balance_of_plant.power_plant.heat_load.wall": { "coordinates": [ "balance_of_plant.time" ], From ad671dc6205044e9c4d6d3eacb1d52f9976c383b Mon Sep 17 00:00:00 2001 From: fuse bot Date: Tue, 24 Sep 2024 16:32:23 +0000 Subject: [PATCH 3/3] Update dd.jl file --- src/dd.jl | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/dd.jl b/src/dd.jl index da19b9c..da58650 100644 --- a/src/dd.jl +++ b/src/dd.jl @@ -94640,16 +94640,32 @@ end balance_of_plant__power_plant__system() = balance_of_plant__power_plant__system{Float64}() +mutable struct balance_of_plant__power_plant__heat_load{T} <: IDS{T} + var"breeder" :: Vector{<:T} + var"divertor" :: Vector{<:T} + var"wall" :: Vector{<:T} + _filled::Set{Symbol} + _frozen::Bool + _in_expression::Vector{Symbol} + _ref :: Union{Nothing,balance_of_plant__power_plant__heat_load} + _parent :: WeakRef +end + +function balance_of_plant__power_plant__heat_load{T}() where T + ids = balance_of_plant__power_plant__heat_load{T}(T[], T[], T[], Set{Symbol}(), false, Symbol[], nothing, WeakRef(nothing)) + return ids +end + +balance_of_plant__power_plant__heat_load() = balance_of_plant__power_plant__heat_load{Float64}() + mutable struct balance_of_plant__power_plant{T} <: IDS{T} - var"breeder_heat_load" :: Vector{<:T} - var"divertor_heat_load" :: Vector{<:T} var"generator_conversion_efficiency" :: Vector{<:T} + var"heat_load" :: balance_of_plant__power_plant__heat_load{T} var"power_cycle_type" :: String var"power_electric_generated" :: Vector{<:T} var"system" :: IDSvector{balance_of_plant__power_plant__system{T}} var"total_heat_rejected" :: Vector{<:T} var"total_heat_supplied" :: Vector{<:T} - var"wall_heat_load" :: Vector{<:T} _filled::Set{Symbol} _frozen::Bool _in_expression::Vector{Symbol} @@ -94658,7 +94674,8 @@ mutable struct balance_of_plant__power_plant{T} <: IDS{T} end function balance_of_plant__power_plant{T}() where T - ids = balance_of_plant__power_plant{T}(T[], T[], T[], "", T[], IDSvector{balance_of_plant__power_plant__system{T}}(), T[], T[], T[], Set{Symbol}(), false, Symbol[], nothing, WeakRef(nothing)) + ids = balance_of_plant__power_plant{T}(T[], balance_of_plant__power_plant__heat_load{T}(), "", T[], IDSvector{balance_of_plant__power_plant__system{T}}(), T[], T[], Set{Symbol}(), false, Symbol[], nothing, WeakRef(nothing)) + setfield!(ids.heat_load, :_parent, WeakRef(ids)) setfield!(ids.system, :_parent, WeakRef(ids)) return ids end @@ -96199,9 +96216,11 @@ const _all_info = Dict{String,Info}( "balance_of_plant.power_electric_plant_operation.system[:].subsystem[:].power" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "Electrical power used to operate the system", true), "balance_of_plant.power_electric_plant_operation.total_power" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "Total ", true), "balance_of_plant.power_plant" => Info{Tuple{}}((), "-", "STRUCTURE", "", true), -"balance_of_plant.power_plant.breeder_heat_load" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the breeder.", true), -"balance_of_plant.power_plant.divertor_heat_load" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the diverter", true), "balance_of_plant.power_plant.generator_conversion_efficiency" => Info{Tuple{String}}(("balance_of_plant.time",), "-", "FLT_1D", "Conversion efficiency of thermal to electric power of the steam cycle", true), +"balance_of_plant.power_plant.heat_load" => Info{Tuple{}}((), "-", "STRUCTURE", "", true), +"balance_of_plant.power_plant.heat_load.breeder" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the breeder.", true), +"balance_of_plant.power_plant.heat_load.divertor" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the diverter", true), +"balance_of_plant.power_plant.heat_load.wall" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the wall.", true), "balance_of_plant.power_plant.power_cycle_type" => Info{Tuple{}}((), "-", "STR_0D", "Type of primary power cycle, :brayton = gas, :rankine = steam", true), "balance_of_plant.power_plant.power_electric_generated" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The net electric power produced by the thermal plant, equal tot the power produced by turbines LESS the power consumed by pumps and compressors", true), "balance_of_plant.power_plant.system[:]" => Info{Tuple{}}((), "-", "STRUCT_ARRAY", "", true), @@ -96219,7 +96238,6 @@ const _all_info = Dict{String,Info}( "balance_of_plant.power_plant.system[:].name" => Info{Tuple{}}((), "-", "STR_0D", "Name of the system", true), "balance_of_plant.power_plant.total_heat_rejected" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The total heat flow being rejected from the thermal plant", true), "balance_of_plant.power_plant.total_heat_supplied" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The total heat flow being supplied to the thermal Plant (Fusion thermal power).", true), -"balance_of_plant.power_plant.wall_heat_load" => Info{Tuple{String}}(("balance_of_plant.time",), "W", "FLT_1D", "The heat flow towards the wall.", true), "balance_of_plant.thermal_efficiency_cycle" => Info{Tuple{String}}(("balance_of_plant.time",), "-", "FLT_1D", "The fractional thermal effiency of the power cycle. Calculated as 1-Q_out/Q_in", true), "balance_of_plant.thermal_efficiency_plant" => Info{Tuple{String}}(("balance_of_plant.time",), "-", "FLT_1D", "The fractional thermal effiency of the entire BOP thermal plant, inlcudes all of the individual cycles. Calculated as 1-Q_out/Q_in", true), "balance_of_plant.time" => Info{Tuple{String}}(("1...N",), "s", "FLT_1D", "Generic time", true),