utf8000landscapeLETTER15152020#ffffff000falsefalseArial8{DEFAULT}000000horizontalSELECT flow_unit, sum(flow_value) as total_flow
from
(select control_valve.control_valve_settings_raw as setting,trim(control_valve.control_valve_settings_raw,'FCV@ 0123456789+-.') as flow_unit,cast(substr(control_valve_settings_raw, 7,10) as real ) as flow_value from control_valve
where substr(control_valve_settings_raw, 1,3) = "FCV"
union all
select valve_settings_raw as setting, trim(valve_settings_raw,'FCV@ 0123456789+-.') as flow_unit,cast(substr(valve_settings_raw, 7,10) as real ) as flow_value from sizing_valve
where substr(valve_settings_raw, 1,3) = "FCV")select
sum(volume_cubic_feet) as volume_total_cubic_feet,
sum(volume_gallons) as volume_total_gallons,
sum(volume_cubic_meters) as volume_total_cubic_meters,
sum(volume_liters) as volume_total_liters,
sum(volume_cubic_inches) as volume_total_cubic_inches,
sum(volume_bbl) as volume_total_bbl,
sum(volume_cubic_centimeters) as volume_total_cubic_centimeters
from
(
select
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) as volume_cubic_meters,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 264.172037284185 as volume_gallons,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 35.3146667214886 as volume_cubic_feet,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 1000 as volume_liters,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 61023.7440947323 as volume_cubic_inches,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 6.28981041152821 as volume_bbl,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 1000000 as volume_cubic_centimeters
from
(SELECT name, fluid_state, length_m, inner_dia_m
FROM
(
select
name,
fluid_state,
length_raw,
length_unit,
inner_diameter,
inner_diameter_unit,
(length_raw*(
CASE
WHEN length_unit = "m" THEN 1.0
WHEN length_unit = "mi" THEN (5280*0.3048)
WHEN length_unit = "ft" THEN 0.3048
WHEN length_unit = "km" THEN 1000
END)
) as length_m,
(inner_diameter*(
CASE
WHEN inner_diameter_unit = "mm" THEN 0.001
WHEN inner_diameter_unit = "in" THEN 0.3048/12
END)
) as inner_dia_m
from
(select *
from pipe
LEFT JOIN fluid_zones ON pipe.fluid_zone == fluid_zones.zone_name)
)
WHERE fluid_state=="Liquid"
))select sum(volume_cubic_feet) as volume_total_cubic_feet, sum(volume_gallons) as volume_total_gallons, sum(volume_cubic_meters) as volume_total_cubic_meters, sum(volume_liters) as volume_total_liters, sum(volume_cubic_inches) as volume_total_cubic_inches, sum(volume_bbl) as volume_total_bbl, sum(volume_cubic_centimeters) as volume_total_cubic_centimeters
from
(
select
(liq_vol_cubic_meters) as volume_cubic_meters,
(liq_vol_cubic_meters) * 264.172037284185 as volume_gallons,
(liq_vol_cubic_meters) * 35.3146667214886 as volume_cubic_feet,
(liq_vol_cubic_meters) * 1000 as volume_liters,
(liq_vol_cubic_meters) * 61023.7440947323 as volume_cubic_inches,
(liq_vol_cubic_meters) * 6.28981041152821 as volume_bbl,
(liq_vol_cubic_meters) * 1000000 as volume_cubic_centimeters
from
(
select name, liquid_volume_raw, liquid_volume_unit,
(liquid_volume_raw*(
CASE
WHEN liquid_volume_unit = "gal" THEN 0.003785412
WHEN liquid_volume_unit = "ft³" THEN 0.028316846592
WHEN liquid_volume_unit = "in³" THEN 0.000016387064
WHEN liquid_volume_unit = "bbl" THEN 0.158987304
WHEN liquid_volume_unit = "L" THEN 0.001
WHEN liquid_volume_unit = "m³" THEN 1.0
WHEN liquid_volume_unit = "cm³ (mL)" THEN 0.000001
END)
) as liq_vol_cubic_meters
from tank
)
);select name, length_raw, length_unit, inner_diameter, inner_diameter_unit,
(length_raw*(
CASE
WHEN length_unit = "m" THEN 1.0
WHEN length_unit = "mi" THEN (5280*0.3048)
WHEN length_unit = "ft" THEN 0.3048
WHEN length_unit = "km" THEN 1000
END)
) as length_m,
(inner_diameter*(
CASE
WHEN inner_diameter_unit = "mm" THEN 0.001
WHEN inner_diameter_unit = "in" THEN 0.3048/12
END)
) as inner_dia_m
from pipeSELECT name, control_valve.control_valve_settings_raw as setting,trim(control_valve.control_valve_settings_raw,'FCV@ 0123456789+-.') as flow_unit,cast(substr(control_valve_settings_raw, 7,10) as real ) as flow_value from control_valve
where substr(control_valve_settings_raw, 1,3) = "FCV"
union
select name, valve_settings_raw as setting, trim(valve_settings_raw,'FCV@ 0123456789+-.') as flow_unit,cast(substr(valve_settings_raw, 7,10) as real ) as flow_value from sizing_valve
where substr(valve_settings_raw, 1,3) = "FCV"select * from document_headerselect name, cast(substr(settings, 7,10) as real ) as flow_only
from (select control_valve.name, control_valve.control_valve_settings_raw as settings from control_valve
where substr(settings, 1,3) = "FCV"
union
select sizing_valve.name, sizing_valve.valve_settings_raw as settings from sizing_valve
where substr(settings, 1,3) = "FCV")select * from pressure_boundary
join device_notes on device_notes.name = pressure_boundary.nameselect ( select count(*) from balancing_orifice ) as balancing_orifice_count,
( select count(*) from centrifugal_pump ) as centrifugal_pump_count,
( select count(*) from control_valve ) as control_valve_count,
( select count(*) from curve_dp ) as curve_dp_count,
( select count(*) from fixed_dp ) as fixed_dp_count,
( select count(*) from flow_demand ) as flow_demand_count,
( select count(*) from fluid_zones ) as fluid_zones_count,
( select count(*) from node ) as node_count,
( select count(*) from nozzle_meter ) as nozzle_meter_count,
( select count(*) from orifice_meter ) as orifice_meter_count,
( select count(*) from pipe ) as pipe_count,
( select count(*) from pipe_specifications ) as pipe_specifications_count,
( select count(*) from pressure_boundary ) as pressure_boundary_count,
( select count(*) from pressure_gain ) as pressure_gain_count,
( select count(*) from sizing_pump ) as sizing_pump_count,
( select count(*) from sizing_valve ) as sizing_valve_count,
( select count(*) from tank ) as tank_count,
( select count(*) from venturi_meter ) as venturi_meter_count,
( select count(*) from heat_source_sink ) as hss_count,
( select count(*) from hx_2_pipe ) as hx_2_pipe_count;Select * from pipeselect sum(cast(substr(setting, 7,10) as real ) )as total_flow
from (select control_valve.name, control_valve.control_valve_settings_raw as setting from control_valve
union
select sizing_valve.name, sizing_valve.valve_settings_raw as setting from sizing_valve)
where substr(setting, 1,3) = "FCV"select * from sizing_valveselect sum(volume_cubic_feet) as volume_total_cubic_feet, sum(volume_gallons) as volume_total_gallons, sum(volume_cubic_meters) as volume_total_cubic_meters, sum(volume_liters) as volume_total_liters, sum(volume_cubic_inches) as volume_total_cubic_inches, sum(volume_bbl) as volume_total_bbl, sum(volume_cubic_centimeters) as volume_total_cubic_centimeters
from
(
select
(tot_vol_cubic_meters) as volume_cubic_meters,
(tot_vol_cubic_meters) * 264.172037284185 as volume_gallons,
(tot_vol_cubic_meters) * 35.3146667214886 as volume_cubic_feet,
(tot_vol_cubic_meters) * 1000 as volume_liters,
(tot_vol_cubic_meters) * 61023.7440947323 as volume_cubic_inches,
(tot_vol_cubic_meters) * 6.28981041152821 as volume_bbl,
(tot_vol_cubic_meters) * 1000000 as volume_cubic_centimeters
from
(
select name, total_volume_raw, total_volume_unit,
(total_volume_raw*(
CASE
WHEN total_volume_unit = "gal" THEN 0.003785412
WHEN total_volume_unit = "ft³" THEN 0.028316846592
WHEN total_volume_unit = "in³" THEN 0.000016387064
WHEN total_volume_unit = "bbl" THEN 0.158987304
WHEN total_volume_unit = "L" THEN 0.001
WHEN total_volume_unit = "m³" THEN 1.0
WHEN total_volume_unit = "cm³ (mL)" THEN 0.000001
END)
) as tot_vol_cubic_meters
from tank
)
);SELECT flow_type, flow_unit, sum(flow_value) as total_flow
from
(select flow_demand_operation as setting,trim(flow_demand_operation,'Set @ 0123456789+-.') as flow_unit,cast(substr(flow_demand_operation, 7,10) as real ) as flow_value, flow_type
from flow_demand
where substr(flow_demand_operation, 1,3) = "Set")
Group by flow_typeselect name, length_raw, length_unit, inner_diameter, inner_diameter_unit,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) as volume_cubic_meters,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 264.172037284185 as volume_gallons,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 35.3146667214886 as volume_cubic_feet,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 1000 as volume_liters,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 61023.7440947323 as volume_cubic_inches,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 6.28981041152821 as volume_bbl,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 1000000 as volume_cubic_centimeters
from
(
select name, length_raw, length_unit, inner_diameter, inner_diameter_unit,
(length_raw*(
CASE
WHEN length_unit = "m" THEN 1.0
WHEN length_unit = "mi" THEN (5280*0.3048)
WHEN length_unit = "ft" THEN 0.3048
WHEN length_unit = "km" THEN 1000
END)
) as length_m,
(inner_diameter*(
CASE
WHEN inner_diameter_unit = "mm" THEN 0.001
WHEN inner_diameter_unit = "in" THEN 0.3048/12
END)
) as inner_dia_m
from pipe
);select
"Total Tank Liquid Volume" as Liquid_Volume,
sum(volume_cubic_feet) as volume_total_cubic_feet,
sum(volume_gallons) as volume_total_gallons,
sum(volume_cubic_meters) as volume_total_cubic_meters,
sum(volume_liters) as volume_total_liters,
sum(volume_cubic_inches) as volume_total_cubic_inches,
sum(volume_bbl) as volume_total_bbl,
sum(volume_cubic_centimeters) as volume_total_cubic_centimeters
from
(
select
(liq_vol_cubic_meters) as volume_cubic_meters,
(liq_vol_cubic_meters) * 264.172037284185 as volume_gallons,
(liq_vol_cubic_meters) * 35.3146667214886 as volume_cubic_feet,
(liq_vol_cubic_meters) * 1000 as volume_liters,
(liq_vol_cubic_meters) * 61023.7440947323 as volume_cubic_inches,
(liq_vol_cubic_meters) * 6.28981041152821 as volume_bbl,
(liq_vol_cubic_meters) * 1000000 as volume_cubic_centimeters
from
(
select name, liquid_volume_raw, liquid_volume_unit, total_volume_raw, total_volume_unit,
(liquid_volume_raw*(
CASE
WHEN liquid_volume_unit = "gal" THEN 0.003785412
WHEN liquid_volume_unit = "ft³" THEN 0.028316846592
WHEN liquid_volume_unit = "in³" THEN 0.000016387064
WHEN liquid_volume_unit = "bbl" THEN 0.158987304
WHEN liquid_volume_unit = "L" THEN 0.001
WHEN liquid_volume_unit = "m³" THEN 1.0
WHEN liquid_volume_unit = "cm³ (mL)" THEN 0.000001
END)
) as liq_vol_cubic_meters
from tank
)
)
UNION
select
"Total Pipe Liquid Volume" as Liquid_Volume,
sum(volume_cubic_feet) as volume_total_cubic_feet,
sum(volume_gallons) as volume_total_gallons,
sum(volume_cubic_meters) as volume_total_cubic_meters,
sum(volume_liters) as volume_total_liters,
sum(volume_cubic_inches) as volume_total_cubic_inches,
sum(volume_bbl) as volume_total_bbl,
sum(volume_cubic_centimeters) as volume_total_cubic_centimeters
from
(
select
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) as volume_cubic_meters,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 264.172037284185 as volume_gallons,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 35.3146667214886 as volume_cubic_feet,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 1000 as volume_liters,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 61023.7440947323 as volume_cubic_inches,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 6.28981041152821 as volume_bbl,
(length_m*inner_dia_m*inner_dia_m*3.14159265/4) * 1000000 as volume_cubic_centimeters
from
(SELECT name, fluid_state, length_m, inner_dia_m
FROM
(
select
name,
fluid_state,
length_raw,
length_unit,
inner_diameter,
inner_diameter_unit,
(length_raw*(
CASE
WHEN length_unit = "m" THEN 1.0
WHEN length_unit = "mi" THEN (5280*0.3048)
WHEN length_unit = "ft" THEN 0.3048
WHEN length_unit = "km" THEN 1000
END)
) as length_m,
(inner_diameter*(
CASE
WHEN inner_diameter_unit = "mm" THEN 0.001
WHEN inner_diameter_unit = "in" THEN 0.3048/12
END)
) as inner_dia_m
from
(select *
from pipe
LEFT JOIN fluid_zones ON pipe.fluid_zone == fluid_zones.zone_name)
)
WHERE fluid_state=="Liquid"
))Select * From device_notessystem_volume.volume_total_bblsystem_volume.volume_total_cubic_inchessystem_volume.volume_total_cubic_meterspipe_summary.volume_gallonspipe_summary.volume_literspipe_summary.volume_cubic_meterssystem_volume.volume_total_cubic_feetsystem_volume.volume_total_cubic_centimeterspipe_summary.volume_cubic_feetsystem_volume.volume_total_literssystem_volume.volume_total_gallonspressure_boundary.pressuredocument_header.document_companydocument_header.document_projectdocument_header.document_authordocument_header.calc_methoddocument_header.laminar_cutoff_rawdocument_header.notesdocument_header.iterations_rawdocument_header.tolerance_rawdatetimedocument_header.filenamedocument_header.current_lineupdocument_header.atmospheric_pressuredocument_header.atmospheric_pressure_unitdocument_header.program_namedocument_header.program_versiondocument_header.allowable_deviation_rawdocument_header.allowable_deviation_unitpagenodatetimedocument_header.program_namedocument_header.program_versionconfiguration.pipe_countconfiguration.tank_countconfiguration.fixed_dp_countconfiguration.curve_dp_countconfiguration.pressure_gain_countconfiguration.sizing_pump_countconfiguration.balancing_orifice_countconfiguration.centrifugal_pump_countconfiguration.orifice_meter_countconfiguration.sizing_valve_countconfiguration.nozzle_meter_countconfiguration.control_valve_countconfiguration.pressure_boundary_countconfiguration.flow_demand_countconfiguration.fluid_zones_countconfiguration.node_countconfiguration.venturi_meter_countconfiguration.pipe_specifications_countconfiguration.hss_countconfiguration.hx_2_pipe_counttotal_flowflow_unitflow_demands.total_flowflow_demands.flow_unitflow_demands.flow_typeaverage_pressurepressure_boundary.pressure_unittotal_pipe_volume.volume_total_gallonstotal_pipe_volume.volume_total_cubic_meterstotal_pipe_volume.volume_total_literstotal_pipe_volume.volume_total_cubic_feettotal_pipe_volume.volume_total_bbltotal_pipe_volume.volume_total_cubic_inchestotal_pipe_volume.volume_total_cubic_centimeterstotal_tank_liquid_volume.volume_total_gallonstotal_tank_liquid_volume.volume_total_literstotal_tank_liquid_volume.volume_total_cubic_centimeterstotal_tank_liquid_volume.volume_total_cubic_meterstotal_tank_liquid_volume.volume_total_bbltotal_tank_liquid_volume.volume_total_cubic_feettotal_tank_liquid_volume.volume_total_cubic_inchessysl_volume_galsysl_volume_cubic_feetsysl_volume_cubic_meterssysl_volume_literssysl_volume_bblsysl_volume_cubic_inchessysl_volume_cubic_centimeterstank_total_capacity.volume_total_gallonstank_total_capacity.volume_total_literstank_total_capacity.volume_total_cubic_centimeterstank_total_capacity.volume_total_cubic_meterstank_total_capacity.volume_total_bbltank_total_capacity.volume_total_cubic_feettank_total_capacity.volume_total_cubic_inches