diff --git a/docs/advanced_concepts.ipynb b/docs/advanced_concepts.ipynb index 34671da91..023ca3466 100644 --- a/docs/advanced_concepts.ipynb +++ b/docs/advanced_concepts.ipynb @@ -150,7 +150,59 @@ "cell_type": "code", "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solver\n", + " type\n", + " turbine_grid\n", + " turbine_grid_points\n", + " 3\n", + "wake\n", + " model_strings\n", + " combination_model\n", + " sosfs\n", + " deflection_model\n", + " gauss\n", + " turbulence_model\n", + " crespo_hernandez\n", + " velocity_model\n", + " jensen\n", + "farm\n", + " layout_x\n", + " [0.0]\n", + " layout_y\n", + " [0.0]\n", + " turbine_type\n", + " ['nrel_5MW']\n", + " turbine_library_path\n", + " /Users/rmudafor/Development/floris/floris/turbine_library\n", + "flow_field\n", + " wind_speeds\n", + " [5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0]\n", + " wind_directions\n", + " [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]\n", + " wind_veer\n", + " 0.0\n", + " wind_shear\n", + " 0.12\n", + " air_density\n", + " 1.225\n", + " turbulence_intensities\n", + " [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]\n", + " reference_wind_height\n", + " 90.0\n", + "name\n", + " GCH\n", + "description\n", + " Default initialization: Gauss-Curl hybrid model (GCH)\n", + "floris_version\n", + " v4\n" + ] + } + ], "source": [ "import floris\n", "\n", @@ -173,6 +225,9 @@ " # turbine_type=[\"my_turbine\"]\n", ")\n", "\n", + "# Verify settings are correct\n", + "fmodel.show_config() # Shows truncated set of inputs; show all with fmodel.show_config(full=True)\n", + "\n", "# Within the calling code's computation, run FLORIS\n", "fmodel.run()" ] diff --git a/floris/floris_model.py b/floris/floris_model.py index 23e01c1d6..a4cf42e83 100644 --- a/floris/floris_model.py +++ b/floris/floris_model.py @@ -1636,10 +1636,20 @@ def get_turbine_layout(self, z=False): else: return xcoords, ycoords - def print_dict(self) -> None: + def show_config(self, full=False) -> None: """Print the FlorisModel dictionary. """ - print_nested_dict(self.core.as_dict()) + config_dict = self.core.as_dict() + if not full: + del config_dict["logging"] + del config_dict["wake"]["enable_secondary_steering"] + del config_dict["wake"]["enable_yaw_added_recovery"] + del config_dict["wake"]["enable_transverse_velocities"] + del config_dict["wake"]["enable_active_wake_mixing"] + del config_dict["wake"]["wake_deflection_parameters"] + del config_dict["wake"]["wake_velocity_parameters"] + del config_dict["wake"]["wake_turbulence_parameters"] + print_nested_dict(config_dict) ### Properties