From 496296c8ed91e8e2077bf77a9496c83e10cfff4c Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 10 Mar 2023 16:25:40 -0700 Subject: [PATCH 01/10] Add my note on installing --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e33fa75..32ea7f3 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ pip install -e emu_python ``` pip install git+https://github.nrel.gov/SEAS/SEAS.git@dv/emuwind ``` +Note from PF: +Had trouble doing it this way on local machine so instead: +cloned into a local folder +checked out the emuwind branch +pip install -e SEAS # Other steps for era 5 Now need to add a file called APIKEY which contains the API Key you'll find in your data.planetos account From 3f55359051ffb3337fe6fe9e8182cb8760f67dd4 Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Sat, 11 Mar 2023 07:33:11 -0700 Subject: [PATCH 02/10] Add more details about local pip install --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32ea7f3..9394cde 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,12 @@ pip install -e emu_python Note from PF: Had trouble doing it this way on local machine so instead: -cloned into a local folder -checked out the emuwind branch +# (Activate conda environment first) +git clone git@github.nrel.gov:SEAS/SEAS.git +cd SEAS +git fetch --all +git checkout dv/emuwind +cd .. pip install -e SEAS # Other steps for era 5 From b87ecb299e8d441549d7df1b862015e9c76e8ac9 Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Sat, 11 Mar 2023 07:33:24 -0700 Subject: [PATCH 03/10] turn off high qos --- example_case_folders/example_sim_04/batch_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example_case_folders/example_sim_04/batch_script.sh b/example_case_folders/example_sim_04/batch_script.sh index 94c0239..3ea63e8 100644 --- a/example_case_folders/example_sim_04/batch_script.sh +++ b/example_case_folders/example_sim_04/batch_script.sh @@ -4,7 +4,7 @@ #SBATCH --nodes=2 #SBATCH --ntasks-per-node=36 #SBATCH --account=ssc -#SBATCH --qos=high +# #SBATCH --qos=high # A lot of modules and conda stuff source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh From 1c350229bf1d8d8f1903b5b998e50e060b6757c0 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 11 Mar 2023 07:42:06 -0700 Subject: [PATCH 04/10] Add an example 6 with updated turbine mod from MB --- .../example_sim_06/amr_input.inp | 174 ++++++++++++++++++ .../example_sim_06/batch_script.sh | 28 +++ .../example_sim_06/emu_input_000.yaml | 60 ++++++ .../example_sim_06/emu_runscript.py | 23 +++ .../example_sim_06/readme.txt | 2 + .../turbine_inputs_from_mike.inp | 164 +++++++++++++++++ 6 files changed, 451 insertions(+) create mode 100755 example_case_folders/example_sim_06/amr_input.inp create mode 100644 example_case_folders/example_sim_06/batch_script.sh create mode 100644 example_case_folders/example_sim_06/emu_input_000.yaml create mode 100644 example_case_folders/example_sim_06/emu_runscript.py create mode 100644 example_case_folders/example_sim_06/readme.txt create mode 100644 example_case_folders/example_sim_06/turbine_inputs_from_mike.inp diff --git a/example_case_folders/example_sim_06/amr_input.inp b/example_case_folders/example_sim_06/amr_input.inp new file mode 100755 index 0000000..6b0b909 --- /dev/null +++ b/example_case_folders/example_sim_06/amr_input.inp @@ -0,0 +1,174 @@ +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SIMULATION STOP # +#.......................................# +time.stop_time = 10800.0 # Max (simulated) time to evolve +time.max_step = -1 # Max number of time steps + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TIME STEP COMPUTATION # +#.......................................# +time.fixed_dt = 0.5 # Use this constant dt if > 0 +time.cfl = 0.95 # CFL factor + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# INPUT AND OUTPUT # +#.......................................# +time.plot_interval = 3600 # Steps between plot files +time.checkpoint_interval = 3600 # Steps between checkpoint files +io.restart_file = "/projects/ssc/amr_precursors/005_abl_neutral_lowTI_redo/chk14400" + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# PHYSICS # +#.......................................# +incflo.gravity = 0. 0. -9.81 # Gravitational force (3D) +incflo.density = 1.0 # Reference density + +incflo.use_godunov = 1 +incflo.godunov_type = weno_z +incflo.diffusion_type = 1 +transport.viscosity = 1.0e-5 +transport.laminar_prandtl = 0.7 +transport.turbulent_prandtl = 0.3333 +turbulence.model = OneEqKsgsM84 + +incflo.physics = ABL Actuator +ICNS.source_terms = BoussinesqBuoyancy CoriolisForcing ABLMeanBoussinesq ActuatorForcing +TKE.source_terms = KsgsM84Src +BoussinesqBuoyancy.reference_temperature = 300.0 +CoriolisForcing.latitude = 41.3 +ABLForcing.abl_forcing_height = 90 +incflo.velocity = 6.928203230275509 4.0 0.0 + + +# Atmospheric boundary layer +ABL.temperature_heights = 0.0 700.0 800.0 1280.0 +ABL.temperature_values = 300.0 300.0 308.0 309.44 +ABL.reference_temperature = 300.0 +ABL.kappa = .40 +ABL.surface_roughness_z0 = 1.0E-4 +ABL.Uperiods = 25.0 +ABL.Vperiods = 25.0 +ABL.cutoff_height = 50.0 +ABL.deltaU = 1.0 +ABL.deltaV = 1.0 +ABL.normal_direction = 2 +ABL.perturb_ref_height = 50.0 +ABL.perturb_temperature = false +ABL.perturb_velocity = true +ABL.stats_output_format = netcdf +ABL.stats_output_frequency = 1 +ABL.surface_temp_flux = 0.00 +ABL.wall_shear_stress_type = "Moeng" + +ABL.bndry_file = "/projects/ssc/amr_precursors/005_abl_neutral_lowTI_redo/bndry_files" +ABL.bndry_io_mode = 1 +ABL.bndry_planes = ylo xlo # I'm (Paul) adding this but not sure if I have to +ABL.bndry_var_names = velocity temperature tke + + +# Output boundary files +ABL.bndry_file = "bndry_files" +ABL.bndry_io_mode = 0 +ABL.bndry_planes = ylo xlo +ABL.bndry_output_start_time = 7200.0 +ABL.bndry_var_names = velocity temperature tke +ABL.bndry_output_format = native +ABL.stats_output_frequency = 1 +ABL.stats_output_format = netcdf + +# Whether to use helics +helics.activated = true + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# ADAPTIVE MESH REFINEMENT # +#.......................................# +amr.n_cell = 512 512 128 # Grid cells at coarsest AMRlevel +amr.max_level = 0 # Max AMR level in hierarchy + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# GEOMETRY # +#.......................................# +geometry.prob_lo = 0. 0. 0. # Lo corner coordinates +geometry.prob_hi = 5120. 5120. 1280. # Hi corner coordinates +geometry.is_periodic = 0 0 0 +xlo.type = "mass_inflow" +xlo.density = 1.0 +xlo.temperature = 0.0 # value required but ignored +xlo.tke = 0.0 +xhi.type = "pressure_outflow" + +ylo.type = "mass_inflow" +ylo.density = 1.0 +ylo.temperature = 0.0 +ylo.tke = 0.0 +yhi.type = "pressure_outflow" + +# Boundary conditions +zlo.type = "wall_model" +zlo.tke_type = "zero_gradient" + +zhi.type = "slip_wall" +zhi.temperature_type = "fixed_gradient" +zhi.temperature = 0.003 # tracer is used to specify potential temperature gradient + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# VERBOSITY # +#.......................................# +incflo.verbose = 0 # incflo_level + + + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SAMPLING # +#.......................................# +incflo.post_processing = samplingPlane samplingLine + +samplingPlane.output_frequency = 600 +samplingPlane.labels = z_plane +samplingPlane.fields = velocity temperature +samplingPlane.z_plane.type = PlaneSampler +samplingPlane.z_plane.axis1 = 5110 0.0 0.0 +samplingPlane.z_plane.axis2 = 0.0 5110 0.0 +samplingPlane.z_plane.origin = 5.0 5.0 0.0 +samplingPlane.z_plane.num_points = 512 512 +samplingPlane.z_plane.normal = 0.0 0.0 1.0 +samplingPlane.z_plane.offsets = 5.0 85.0 155.0 255.0 + + +samplingLine.output_frequency = 1 +samplingLine.labels = z_line +samplingLine.fields = velocity temperature +samplingLine.z_line.type = LineSampler +samplingLine.z_line.num_points = 128 +samplingLine.z_line.start = 5.0 5.0 5.0 +samplingLine.z_line.end = 5.0 5.0 1275.0 + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TURBINES # +#.......................................# + +# 2.3 MW Turbine inputs + +Actuator.labels = T00 T01 +Actuator.type = JoukowskyDisk +Actuator.JoukowskyDisk.rotor_diameter = 116.0 +Actuator.JoukowskyDisk.hub_height = 90.0 +Actuator.JoukowskyDisk.output_frequency = 10 +Actuator.JoukowskyDisk.diameters_to_sample = 2.5 +Actuator.JoukowskyDisk.num_points_r = 40 +Actuator.JoukowskyDisk.num_points_t = 5 +Actuator.JoukowskyDisk.num_blades = 3 +Actuator.JoukowskyDisk.use_tip_correction = true +Actuator.JoukowskyDisk.use_root_correction = true +Actuator.JoukowskyDisk.epsilon = 5.0 +Actuator.JoukowskyDisk.vortex_core_size = 13.0 + +Actuator.JoukowskyDisk.wind_speed = 3.0 3.889649963239854 4.684006996752303 5.377830233987229 5.966542092267928 6.44625847394617 6.8138143922059236 7.066784852446481 7.203500851477444 7.22306038896904 7.320786359429763 7.535153078939617 7.864746237154081 8.30739130337076 8.860167873258558 9.519428936578247 10.280824938773394 10.589724312062877 11.13933247768231 12.08928744604103 13.12442240111568 14.237907914913496 15.422397632159566 16.670076738763772 17.972713521001396 19.321713675239476 20.708177009893884 22.122956165519163 23.556716965618207 25.0 +Actuator.JoukowskyDisk.rpm = 5.500000000399841 5.7503730274604 6.924733009169061 7.950466035772244 8.820804709636782 9.530006866155707 10.073393458373337 10.447379427563192 10.649497356086282 10.678413746477254 10.82288967359941 11.139804720841314 11.627068002870239 12.28146474128283 13.098677474494233 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 +Actuator.JoukowskyDisk.thrust_coeff = 0.795419507524108 0.8163759621542088 0.8163759621542089 0.8163759621542088 0.8163759621542088 0.8163759621542093 0.8163759621542093 0.816375962154209 0.8163759621542089 0.816375962154209 0.8163759621542089 0.8163759621542088 0.8163759621542088 0.7816497292837605 0.6881024487256834 0.5960935792514858 0.5110705883010171 0.48169007343985104 0.3992418445397665 0.301726241148816 0.23137184415660814 0.17948146484830918 0.1408250546606467 0.11178366795199553 0.08975645587417404 0.07310080594700819 0.060299514659720915 0.0504505646442757 0.04286514300370846 0.03692885272686376 + + +Actuator.JoukowskyDisk.yaw = 240.0 + +Actuator.T00.base_position = 2000.0 2000.0 0.0 +Actuator.T01.base_position = 2500.0 2500.0 0.0 diff --git a/example_case_folders/example_sim_06/batch_script.sh b/example_case_folders/example_sim_06/batch_script.sh new file mode 100644 index 0000000..3ea63e8 --- /dev/null +++ b/example_case_folders/example_sim_06/batch_script.sh @@ -0,0 +1,28 @@ +#!/bin/bash +#SBATCH --job-name=emu +#SBATCH --time=1:00:00 +#SBATCH --nodes=2 +#SBATCH --ntasks-per-node=36 +#SBATCH --account=ssc +# #SBATCH --qos=high + +# A lot of modules and conda stuff +source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh +module use /nopt/nrel/apps/modules/centos74/modulefiles +module purge +module load conda/5.3 +module load intel-mpi/2018.0.3 +module load helics/helics-3.1.0_openmpi +module load netcdf-c/4.7.3/gcc-mpi +conda activate emupy + +# Set up the helics broker +helics_broker -t zmq -f 2 --loglevel="debug" & + +# Need to set this to your emu_python folder +# cd /home/pfleming/emu_python/emu_python +python3 emu_runscript.py emu_input_000.yaml >> logemu 2>&1 & # Start the controller center and pass in input file + +# Now go back to scratch folder and launch the job +# cd /scratch/pfleming/c2c/example_sim_02 +mpirun -n 72 /home/pfleming/amr-wind/build/amr_wind amr_input.inp >> logamr 2>&1 \ No newline at end of file diff --git a/example_case_folders/example_sim_06/emu_input_000.yaml b/example_case_folders/example_sim_06/emu_input_000.yaml new file mode 100644 index 0000000..51653e0 --- /dev/null +++ b/example_case_folders/example_sim_06/emu_input_000.yaml @@ -0,0 +1,60 @@ +# Input YAML for emy_python + +# Name +name: example_000 + +### +# Describe this emulator setup +description: Just a solar plant + +dt: 0.5 + +emu_comms: + + amr_wind: + + wind_farm_0: + type: amr_wind_local #options are amr_wind or amr_wind_local + amr_wind_input_file: amr_input.inp + + helics: + + config: + name: emu_python # What is the purpose of this name + use_dash_frontend: False + KAFKA: False + KAFKA_topics: EMUV1py + helics: + # deltat: 1 # This will be assigned in software + subscription_topics: [status] + publication_topics: [control] + endpoints: [] + helicsport: 23405 + publication_interval: 1 + endpoint_interval: 1 + starttime: 0 + stoptime: 36000 + Agent: ControlCenter + +py_sims: + + solar_farm_0: # The name of py_sim object 1 + + py_sim_type: SimpleSolar + capacity: 50 # MW + efficiency: 0.5 #Fraction + + initial_conditions: + + power: 25 # MW + irradiance: 1000 + + +controller: + + + + + + + diff --git a/example_case_folders/example_sim_06/emu_runscript.py b/example_case_folders/example_sim_06/emu_runscript.py new file mode 100644 index 0000000..0ee5157 --- /dev/null +++ b/example_case_folders/example_sim_06/emu_runscript.py @@ -0,0 +1,23 @@ +from emu_python.emulator import Emulator +from emu_python.controller import Controller +# from emu_python.emu_comms import EmuComms +from emu_python.py_sims import PySims +from emu_python.utilities import load_yaml + +import sys + + + +input_dict = load_yaml(sys.argv[1]) + +#print(input_dict) + +controller = Controller(input_dict) +py_sims = PySims(input_dict) + + +emulator = Emulator(controller, py_sims, input_dict) +emulator.run_helics_setup() +emulator.enter_execution(function_targets=[], + function_arguments=[[]]) + diff --git a/example_case_folders/example_sim_06/readme.txt b/example_case_folders/example_sim_06/readme.txt new file mode 100644 index 0000000..bad944f --- /dev/null +++ b/example_case_folders/example_sim_06/readme.txt @@ -0,0 +1,2 @@ +This is the second case meant to run on AMR-Wind, it is mostly copy of example_sim_04 except includes corrections to the turbine model from Michale Brazell + diff --git a/example_case_folders/example_sim_06/turbine_inputs_from_mike.inp b/example_case_folders/example_sim_06/turbine_inputs_from_mike.inp new file mode 100644 index 0000000..ff59c36 --- /dev/null +++ b/example_case_folders/example_sim_06/turbine_inputs_from_mike.inp @@ -0,0 +1,164 @@ +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SIMULATION STOP # +#.......................................# +time.stop_time = 10800.0 # Max (simulated) time to evolve +time.max_step = -1 # Max number of time steps + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TIME STEP COMPUTATION # +#.......................................# +time.fixed_dt = 0.5 # Use this constant dt if > 0 +time.cfl = 0.95 # CFL factor + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# INPUT AND OUTPUT # +#.......................................# +time.plot_interval = 3600 # Steps between plot files +time.checkpoint_interval = 3600 # Steps between checkpoint files +io.restart_file = "../../example_precursors/004_abl_neutral_highTI/chk14400" # set restart file here + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# PHYSICS # +#.......................................# +incflo.gravity = 0. 0. -9.81 # Gravitational force (3D) +incflo.density = 1.0 # Reference density + +incflo.use_godunov = 1 +incflo.godunov_type = weno_z +incflo.diffusion_type = 1 +transport.viscosity = 1.0e-5 +transport.laminar_prandtl = 0.7 +transport.turbulent_prandtl = 0.3333 +turbulence.model = OneEqKsgsM84 + +incflo.physics = ABL Actuator +ICNS.source_terms = BoussinesqBuoyancy CoriolisForcing BodyForce ABLMeanBoussinesq ActuatorForcing +TKE.source_terms = KsgsM84Src +BoussinesqBuoyancy.reference_temperature = 300.0 +CoriolisForcing.latitude = 41.3 +BodyForce.magnitude = 0.0 0.0 0.0 # time average end of precursor abl_forcing_x,_y in ABLStats file and apply here +incflo.velocity = 6.928203230275509 4.0 0.0 + + +# Atmospheric boundary layer +ABL.temperature_heights = 0.0 700.0 800.0 1280.0 +ABL.temperature_values = 300.0 300.0 308.0 309.44 +ABL.reference_temperature = 300.0 +ABL.kappa = .40 +ABL.surface_roughness_z0 = 0.15 +ABL.Uperiods = 25.0 +ABL.Vperiods = 25.0 +ABL.cutoff_height = 50.0 +ABL.deltaU = 1.0 +ABL.deltaV = 1.0 +ABL.normal_direction = 2 +ABL.perturb_ref_height = 50.0 +ABL.perturb_temperature = false +ABL.perturb_velocity = true +ABL.stats_output_format = netcdf +ABL.stats_output_frequency = 1 +ABL.surface_temp_flux = 0.00 +ABL.wall_shear_stress_type = "Moeng" + +# Output boundary files +ABL.bndry_file = "../../example_precursors/004_abl_neutral_highTI/bndry_files" # set bndry plane files here +ABL.bndry_io_mode = 1 # 0 is output, 1 is input, -1 is ignore +ABL.bndry_planes = ylo xlo +ABL.bndry_output_start_time = 7200.0 +ABL.bndry_var_names = velocity temperature tke +ABL.bndry_output_format = native +ABL.stats_output_frequency = 1 +ABL.stats_output_format = netcdf + +# Whether to use helics +helics.activated = false + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# ADAPTIVE MESH REFINEMENT # +#.......................................# +amr.n_cell = 512 512 128 # Grid cells at coarsest AMRlevel +amr.max_level = 0 # Max AMR level in hierarchy + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# GEOMETRY # +#.......................................# +geometry.prob_lo = 0. 0. 0. # Lo corner coordinates +geometry.prob_hi = 5120. 5120. 1280. # Hi corner coordinates +geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1) + +# Boundary conditions +xlo.type = "mass_inflow" +xlo.density = 1.0 +xlo.temperature = 0.0 # value required but ignored +xlo.tke = 0.0 +xhi.type = "pressure_outflow" + +ylo.type = "mass_inflow" +ylo.density = 1.0 +ylo.temperature = 0.0 +ylo.tke = 0.0 +yhi.type = "pressure_outflow" + +zlo.type = "wall_model" +zlo.tke_type = "zero_gradient" +zhi.type = "slip_wall" +zhi.temperature_type = "fixed_gradient" +zhi.temperature = 0.003 # tracer is used to specify potential temperature gradient + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# VERBOSITY # +#.......................................# +incflo.verbose = 0 # incflo_level + + + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SAMPLING # +#.......................................# +incflo.post_processing = samplingPlane samplingLine + +samplingPlane.output_frequency = 3600 +samplingPlane.labels = z_plane +samplingPlane.fields = velocity temperature +samplingPlane.z_plane.type = PlaneSampler +samplingPlane.z_plane.axis1 = 5110 0.0 0.0 +samplingPlane.z_plane.axis2 = 0.0 5110 0.0 +samplingPlane.z_plane.origin = 5.0 5.0 0.0 +samplingPlane.z_plane.num_points = 512 512 +samplingPlane.z_plane.normal = 0.0 0.0 1.0 +samplingPlane.z_plane.offsets = 5.0 85.0 155.0 255.0 + + +samplingLine.output_frequency = 1 +samplingLine.labels = z_line +samplingLine.fields = velocity temperature +samplingLine.z_line.type = LineSampler +samplingLine.z_line.num_points = 128 +samplingLine.z_line.start = 5.0 5.0 5.0 +samplingLine.z_line.end = 5.0 5.0 1275.0 + +# 2.3 MW Turbine inputs + +Actuator.labels = T00 T01 +Actuator.type = JoukowskyDisk +Actuator.JoukowskyDisk.rotor_diameter = 116.0 +Actuator.JoukowskyDisk.hub_height = 90.0 +Actuator.JoukowskyDisk.output_frequency = 10 +Actuator.JoukowskyDisk.diameters_to_sample = 2.5 +Actuator.JoukowskyDisk.num_points_r = 40 +Actuator.JoukowskyDisk.num_points_t = 5 +Actuator.JoukowskyDisk.num_blades = 3 +Actuator.JoukowskyDisk.use_tip_correction = true +Actuator.JoukowskyDisk.use_root_correction = true +Actuator.JoukowskyDisk.epsilon = 5.0 +Actuator.JoukowskyDisk.vortex_core_size = 13.0 + +Actuator.JoukowskyDisk.wind_speed = 3.0 3.889649963239854 4.684006996752303 5.377830233987229 5.966542092267928 6.44625847394617 6.8138143922059236 7.066784852446481 7.203500851477444 7.22306038896904 7.320786359429763 7.535153078939617 7.864746237154081 8.30739130337076 8.860167873258558 9.519428936578247 10.280824938773394 10.589724312062877 11.13933247768231 12.08928744604103 13.12442240111568 14.237907914913496 15.422397632159566 16.670076738763772 17.972713521001396 19.321713675239476 20.708177009893884 22.122956165519163 23.556716965618207 25.0 +Actuator.JoukowskyDisk.rpm = 5.500000000399841 5.7503730274604 6.924733009169061 7.950466035772244 8.820804709636782 9.530006866155707 10.073393458373337 10.447379427563192 10.649497356086282 10.678413746477254 10.82288967359941 11.139804720841314 11.627068002870239 12.28146474128283 13.098677474494233 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 13.141137992834643 +Actuator.JoukowskyDisk.thrust_coeff = 0.795419507524108 0.8163759621542088 0.8163759621542089 0.8163759621542088 0.8163759621542088 0.8163759621542093 0.8163759621542093 0.816375962154209 0.8163759621542089 0.816375962154209 0.8163759621542089 0.8163759621542088 0.8163759621542088 0.7816497292837605 0.6881024487256834 0.5960935792514858 0.5110705883010171 0.48169007343985104 0.3992418445397665 0.301726241148816 0.23137184415660814 0.17948146484830918 0.1408250546606467 0.11178366795199553 0.08975645587417404 0.07310080594700819 0.060299514659720915 0.0504505646442757 0.04286514300370846 0.03692885272686376 + + +Actuator.JoukowskyDisk.yaw = 240.0 + +Actuator.T00.base_position = 2000.0 2000.0 0.0 +Actuator.T01.base_position = 2500.0 2500.0 0.0 \ No newline at end of file From 70a6ea4c1f9a3fd1e103e0cdf6c9fc01bda00a1a Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Mon, 13 Mar 2023 11:34:11 -0600 Subject: [PATCH 05/10] Change hard-coded yaw control to 240 --- emu_python/emulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emu_python/emulator.py b/emu_python/emulator.py index 7982cd8..d6c7d53 100644 --- a/emu_python/emulator.py +++ b/emu_python/emulator.py @@ -230,7 +230,7 @@ def process_periodic_publication(self): # self.set_wind_speed_direction() #yaw_angles = [270 for t in range(self.num_turbines)] - yaw_angles = [270 for t in range(self.num_turbines)] + yaw_angles = [240 for t in range(self.num_turbines)] # log these in kafka #yaw_angles[1] = 260 From 886d58923fc6a559edaa920159b3ab22a1a81e5e Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Mon, 13 Mar 2023 13:27:31 -0600 Subject: [PATCH 06/10] Fix duplicate bndry io --- example_case_folders/example_sim_04/amr_input.inp | 4 ++-- example_case_folders/example_sim_05/amr_input.inp | 2 +- example_case_folders/example_sim_06/amr_input.inp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example_case_folders/example_sim_04/amr_input.inp b/example_case_folders/example_sim_04/amr_input.inp index 2c7ba44..4383177 100755 --- a/example_case_folders/example_sim_04/amr_input.inp +++ b/example_case_folders/example_sim_04/amr_input.inp @@ -61,14 +61,14 @@ ABL.surface_temp_flux = 0.00 ABL.wall_shear_stress_type = "Moeng" ABL.bndry_file = "/projects/ssc/amr_precursors/005_abl_neutral_lowTI_redo/bndry_files" -ABL.bndry_io_mode = 1 +ABL.bndry_io_mode = 1 # Input mode ABL.bndry_planes = ylo xlo # I'm (Paul) adding this but not sure if I have to ABL.bndry_var_names = velocity temperature tke # Output boundary files ABL.bndry_file = "bndry_files" -ABL.bndry_io_mode = 0 +# ABL.bndry_io_mode = 0 Comment out output mode ABL.bndry_planes = ylo xlo ABL.bndry_output_start_time = 7200.0 ABL.bndry_var_names = velocity temperature tke diff --git a/example_case_folders/example_sim_05/amr_input.inp b/example_case_folders/example_sim_05/amr_input.inp index 2c7ba44..9f6c443 100755 --- a/example_case_folders/example_sim_05/amr_input.inp +++ b/example_case_folders/example_sim_05/amr_input.inp @@ -68,7 +68,7 @@ ABL.bndry_var_names = velocity temperature tke # Output boundary files ABL.bndry_file = "bndry_files" -ABL.bndry_io_mode = 0 +# ABL.bndry_io_mode = 0 ABL.bndry_planes = ylo xlo ABL.bndry_output_start_time = 7200.0 ABL.bndry_var_names = velocity temperature tke diff --git a/example_case_folders/example_sim_06/amr_input.inp b/example_case_folders/example_sim_06/amr_input.inp index 6b0b909..8ccce75 100755 --- a/example_case_folders/example_sim_06/amr_input.inp +++ b/example_case_folders/example_sim_06/amr_input.inp @@ -61,14 +61,14 @@ ABL.surface_temp_flux = 0.00 ABL.wall_shear_stress_type = "Moeng" ABL.bndry_file = "/projects/ssc/amr_precursors/005_abl_neutral_lowTI_redo/bndry_files" -ABL.bndry_io_mode = 1 +ABL.bndry_io_mode = 1 #Input mode ABL.bndry_planes = ylo xlo # I'm (Paul) adding this but not sure if I have to ABL.bndry_var_names = velocity temperature tke # Output boundary files ABL.bndry_file = "bndry_files" -ABL.bndry_io_mode = 0 +# ABL.bndry_io_mode = 0 # Comment out output mode ABL.bndry_planes = ylo xlo ABL.bndry_output_start_time = 7200.0 ABL.bndry_var_names = velocity temperature tke From d35da9ea333700c87e6518b5b9248f0428ec3916 Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Mon, 13 Mar 2023 14:56:05 -0600 Subject: [PATCH 07/10] remove duplicate bndry_file --- example_case_folders/example_sim_04/amr_input.inp | 2 -- example_case_folders/example_sim_05/amr_input.inp | 2 -- example_case_folders/example_sim_06/amr_input.inp | 2 -- 3 files changed, 6 deletions(-) diff --git a/example_case_folders/example_sim_04/amr_input.inp b/example_case_folders/example_sim_04/amr_input.inp index 4383177..60e1173 100755 --- a/example_case_folders/example_sim_04/amr_input.inp +++ b/example_case_folders/example_sim_04/amr_input.inp @@ -67,8 +67,6 @@ ABL.bndry_var_names = velocity temperature tke # Output boundary files -ABL.bndry_file = "bndry_files" -# ABL.bndry_io_mode = 0 Comment out output mode ABL.bndry_planes = ylo xlo ABL.bndry_output_start_time = 7200.0 ABL.bndry_var_names = velocity temperature tke diff --git a/example_case_folders/example_sim_05/amr_input.inp b/example_case_folders/example_sim_05/amr_input.inp index 9f6c443..6254ba9 100755 --- a/example_case_folders/example_sim_05/amr_input.inp +++ b/example_case_folders/example_sim_05/amr_input.inp @@ -67,8 +67,6 @@ ABL.bndry_var_names = velocity temperature tke # Output boundary files -ABL.bndry_file = "bndry_files" -# ABL.bndry_io_mode = 0 ABL.bndry_planes = ylo xlo ABL.bndry_output_start_time = 7200.0 ABL.bndry_var_names = velocity temperature tke diff --git a/example_case_folders/example_sim_06/amr_input.inp b/example_case_folders/example_sim_06/amr_input.inp index 8ccce75..325733e 100755 --- a/example_case_folders/example_sim_06/amr_input.inp +++ b/example_case_folders/example_sim_06/amr_input.inp @@ -67,8 +67,6 @@ ABL.bndry_var_names = velocity temperature tke # Output boundary files -ABL.bndry_file = "bndry_files" -# ABL.bndry_io_mode = 0 # Comment out output mode ABL.bndry_planes = ylo xlo ABL.bndry_output_start_time = 7200.0 ABL.bndry_var_names = velocity temperature tke From 3c33a6319f16828c673e38ead6e06dbe0cbddecd Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Wed, 15 Mar 2023 15:14:24 -0600 Subject: [PATCH 08/10] Update batch script for eagle --- example_case_folders/example_sim_04/batch_script.sh | 9 ++++++--- example_case_folders/example_sim_06/batch_script.sh | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/example_case_folders/example_sim_04/batch_script.sh b/example_case_folders/example_sim_04/batch_script.sh index 3ea63e8..f1e8667 100644 --- a/example_case_folders/example_sim_04/batch_script.sh +++ b/example_case_folders/example_sim_04/batch_script.sh @@ -8,13 +8,16 @@ # A lot of modules and conda stuff source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh -module use /nopt/nrel/apps/modules/centos74/modulefiles +# module use /nopt/nrel/apps/modules/centos74/modulefiles module purge -module load conda/5.3 +# module load conda/5.3 +module load conda module load intel-mpi/2018.0.3 module load helics/helics-3.1.0_openmpi module load netcdf-c/4.7.3/gcc-mpi -conda activate emupy +# module load mkl +# module load mpt +source activate emupy # Set up the helics broker helics_broker -t zmq -f 2 --loglevel="debug" & diff --git a/example_case_folders/example_sim_06/batch_script.sh b/example_case_folders/example_sim_06/batch_script.sh index 3ea63e8..f1e8667 100644 --- a/example_case_folders/example_sim_06/batch_script.sh +++ b/example_case_folders/example_sim_06/batch_script.sh @@ -8,13 +8,16 @@ # A lot of modules and conda stuff source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh -module use /nopt/nrel/apps/modules/centos74/modulefiles +# module use /nopt/nrel/apps/modules/centos74/modulefiles module purge -module load conda/5.3 +# module load conda/5.3 +module load conda module load intel-mpi/2018.0.3 module load helics/helics-3.1.0_openmpi module load netcdf-c/4.7.3/gcc-mpi -conda activate emupy +# module load mkl +# module load mpt +source activate emupy # Set up the helics broker helics_broker -t zmq -f 2 --loglevel="debug" & From 98b269469ad9ac26daf93935fbd9755ad307fd5d Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Wed, 15 Mar 2023 15:51:31 -0600 Subject: [PATCH 09/10] Add lines from Chris' rec --- example_case_folders/example_sim_04/batch_script.sh | 7 ++++++- example_case_folders/example_sim_06/batch_script.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/example_case_folders/example_sim_04/batch_script.sh b/example_case_folders/example_sim_04/batch_script.sh index f1e8667..b68bc0d 100644 --- a/example_case_folders/example_sim_04/batch_script.sh +++ b/example_case_folders/example_sim_04/batch_script.sh @@ -12,12 +12,17 @@ source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh module purge # module load conda/5.3 module load conda +export PREFIX=~/.conda-envs/emupy +export PATH=$PREFIX/bin:$PATH +export FI_PROVIDER_PATH=$PREFIX/lib/libfabric/prov +export LD_LIBRARY_PATH=$PREFIX/lib/libfabric:$PREFIX/lib/release_mt:$LD_LIBRARY_PATH +source activate emupy module load intel-mpi/2018.0.3 module load helics/helics-3.1.0_openmpi module load netcdf-c/4.7.3/gcc-mpi # module load mkl # module load mpt -source activate emupy + # Set up the helics broker helics_broker -t zmq -f 2 --loglevel="debug" & diff --git a/example_case_folders/example_sim_06/batch_script.sh b/example_case_folders/example_sim_06/batch_script.sh index f1e8667..b68bc0d 100644 --- a/example_case_folders/example_sim_06/batch_script.sh +++ b/example_case_folders/example_sim_06/batch_script.sh @@ -12,12 +12,17 @@ source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh module purge # module load conda/5.3 module load conda +export PREFIX=~/.conda-envs/emupy +export PATH=$PREFIX/bin:$PATH +export FI_PROVIDER_PATH=$PREFIX/lib/libfabric/prov +export LD_LIBRARY_PATH=$PREFIX/lib/libfabric:$PREFIX/lib/release_mt:$LD_LIBRARY_PATH +source activate emupy module load intel-mpi/2018.0.3 module load helics/helics-3.1.0_openmpi module load netcdf-c/4.7.3/gcc-mpi # module load mkl # module load mpt -source activate emupy + # Set up the helics broker helics_broker -t zmq -f 2 --loglevel="debug" & From 605db9fb291f19f2aa270b12a9da753f5e9b4b54 Mon Sep 17 00:00:00 2001 From: Paul Fleming Date: Thu, 16 Mar 2023 09:25:32 -0600 Subject: [PATCH 10/10] More generic modules --- example_case_folders/example_sim_04/batch_script.sh | 3 ++- example_case_folders/example_sim_06/batch_script.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example_case_folders/example_sim_04/batch_script.sh b/example_case_folders/example_sim_04/batch_script.sh index b68bc0d..d33f77e 100644 --- a/example_case_folders/example_sim_04/batch_script.sh +++ b/example_case_folders/example_sim_04/batch_script.sh @@ -9,6 +9,7 @@ # A lot of modules and conda stuff source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh # module use /nopt/nrel/apps/modules/centos74/modulefiles +module use /not/nrel/apps/modules/default/modulefiles module purge # module load conda/5.3 module load conda @@ -17,7 +18,7 @@ export PATH=$PREFIX/bin:$PATH export FI_PROVIDER_PATH=$PREFIX/lib/libfabric/prov export LD_LIBRARY_PATH=$PREFIX/lib/libfabric:$PREFIX/lib/release_mt:$LD_LIBRARY_PATH source activate emupy -module load intel-mpi/2018.0.3 +# module load intel-mpi/2018.0.3 module load helics/helics-3.1.0_openmpi module load netcdf-c/4.7.3/gcc-mpi # module load mkl diff --git a/example_case_folders/example_sim_06/batch_script.sh b/example_case_folders/example_sim_06/batch_script.sh index b68bc0d..d33f77e 100644 --- a/example_case_folders/example_sim_06/batch_script.sh +++ b/example_case_folders/example_sim_06/batch_script.sh @@ -9,6 +9,7 @@ # A lot of modules and conda stuff source /nopt/nrel/apps/anaconda/5.3/etc/profile.d/conda.sh # module use /nopt/nrel/apps/modules/centos74/modulefiles +module use /not/nrel/apps/modules/default/modulefiles module purge # module load conda/5.3 module load conda @@ -17,7 +18,7 @@ export PATH=$PREFIX/bin:$PATH export FI_PROVIDER_PATH=$PREFIX/lib/libfabric/prov export LD_LIBRARY_PATH=$PREFIX/lib/libfabric:$PREFIX/lib/release_mt:$LD_LIBRARY_PATH source activate emupy -module load intel-mpi/2018.0.3 +# module load intel-mpi/2018.0.3 module load helics/helics-3.1.0_openmpi module load netcdf-c/4.7.3/gcc-mpi # module load mkl