From 50969314629f5fd3b1175ebaa3900257d619fdc1 Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Mon, 21 Oct 2024 18:25:55 -0700 Subject: [PATCH 01/10] add MIO to all if conditions --- amr-wind/wind_energy/ABLBoundaryPlane.cpp | 12 +++++++++--- amr-wind/wind_energy/ABLFillInflow.cpp | 3 ++- amr-wind/wind_energy/ABLFillMPL.cpp | 3 ++- amr-wind/wind_energy/ABLModulatedPowerLaw.cpp | 8 ++++++-- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/amr-wind/wind_energy/ABLBoundaryPlane.cpp b/amr-wind/wind_energy/ABLBoundaryPlane.cpp index 5f4f267e78..475efb7f13 100644 --- a/amr-wind/wind_energy/ABLBoundaryPlane.cpp +++ b/amr-wind/wind_energy/ABLBoundaryPlane.cpp @@ -735,10 +735,12 @@ void ABLBoundaryPlane::read_header() if (std::all_of( m_fields.begin(), m_fields.end(), [ori](const auto* fld) { - return fld->bc_type()[ori] != BC::mass_inflow; + return ((fld->bc_type()[ori] != BC::mass_inflow) && + (fld->bc_type()[ori] != BC::mass_inflow_outflow)); })) { continue; } +amrex::Print() << "!!! read_header(): ori " << ori << " entered." << std::endl; m_in_data.define_plane(ori); @@ -850,9 +852,11 @@ void ABLBoundaryPlane::read_file(const bool nph_target_time) auto ori = oit(); if ((!m_in_data.is_populated(ori)) || - (field.bc_type()[ori] != BC::mass_inflow)) { + ((field.bc_type()[ori] != BC::mass_inflow) && + (field.bc_type()[ori] != BC::mass_inflow_outflow))) { continue; } +amrex::Print() << "!!! read_file(): ori " << ori << " entered for " << field.name() << std::endl; std::string facename1 = amrex::Concatenate(filename1 + '_', ori, 1); @@ -895,9 +899,11 @@ void ABLBoundaryPlane::populate_data( for (amrex::OrientationIter oit; oit != nullptr; ++oit) { auto ori = oit(); if ((!m_in_data.is_populated(ori)) || - (fld.bc_type()[ori] != BC::mass_inflow)) { + ((fld.bc_type()[ori] != BC::mass_inflow) && + (fld.bc_type()[ori] != BC::mass_inflow_outflow))) { continue; } +amrex::Print() << "!!! populate_data(): ori " << ori << " entered for " << fld.name() << std::endl; // Only proceed with data population if fine levels touch the boundary if (lev > 0) { diff --git a/amr-wind/wind_energy/ABLFillInflow.cpp b/amr-wind/wind_energy/ABLFillInflow.cpp index c931428554..3de9b766c7 100644 --- a/amr-wind/wind_energy/ABLFillInflow.cpp +++ b/amr-wind/wind_energy/ABLFillInflow.cpp @@ -76,7 +76,8 @@ void ABLFillInflow::fillpatch_sibling_fields( const auto bct = ibctype[ori]; const int dir = ori.coordDir(); for (int i = 0; i < m_field.num_comp(); ++i) { - if (bct == BC::mass_inflow) { + if ((bct == BC::mass_inflow) || + (bct == BC::mass_inflow_outflow)) { if (side == amrex::Orientation::low) { ph_bcrec[i].setLo(dir, amrex::BCType::foextrap); fp_bcrec[i].setLo( diff --git a/amr-wind/wind_energy/ABLFillMPL.cpp b/amr-wind/wind_energy/ABLFillMPL.cpp index 29cce18ac9..ed118189b8 100644 --- a/amr-wind/wind_energy/ABLFillMPL.cpp +++ b/amr-wind/wind_energy/ABLFillMPL.cpp @@ -86,7 +86,8 @@ void ABLFillMPL::fillpatch_sibling_fields( const auto bct = ibctype[ori]; const int dir = ori.coordDir(); for (int i = 0; i < m_field.num_comp(); ++i) { - if (bct == BC::mass_inflow) { + if ((bct == BC::mass_inflow) || + (bct == BC::mass_inflow_outflow)) { if (side == amrex::Orientation::low) { lbcrec[i].setLo(dir, amrex::BCType::foextrap); } else { diff --git a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp index fc31e62e6e..4a3f922204 100644 --- a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp +++ b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp @@ -165,9 +165,11 @@ void ABLModulatedPowerLaw::set_velocity( for (amrex::OrientationIter oit; oit != nullptr; ++oit) { auto ori = oit(); - if (bctype[ori] != BC::mass_inflow) { + if ((bctype[ori] != BC::mass_inflow) && + (bctype[ori] != BC::mass_inflow_outflow)) { continue; } +amrex::Print() << "!!! set_velocity(): ori " << ori << " entered for " << fld.name() << std::endl; const int idir = ori.coordDir(); const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) @@ -240,9 +242,11 @@ void ABLModulatedPowerLaw::set_temperature( for (amrex::OrientationIter oit; oit != nullptr; ++oit) { auto ori = oit(); - if (bctype[ori] != BC::mass_inflow) { + if ((bctype[ori] != BC::mass_inflow) && + (bctype[ori] != BC::mass_inflow_outflow)) { continue; } +amrex::Print() << "!!! set_temperature(): ori " << ori << " entered for " << fld.name() << std::endl; const int idir = ori.coordDir(); const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) From 41e6978bd96c23a3253bb055efcaaba6e71bcc06 Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Mon, 21 Oct 2024 18:43:26 -0700 Subject: [PATCH 02/10] activate neumann fills for temperature --- amr-wind/boundary_conditions/BCInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amr-wind/boundary_conditions/BCInterface.cpp b/amr-wind/boundary_conditions/BCInterface.cpp index a45e95b612..ffb42c4b55 100644 --- a/amr-wind/boundary_conditions/BCInterface.cpp +++ b/amr-wind/boundary_conditions/BCInterface.cpp @@ -102,7 +102,7 @@ void BCIface::set_bcfuncs() m_field.register_custom_bc(ori); } - if ((m_field.name() == "velocity") // only velocity for now + if (((m_field.name() == "velocity") || (m_field.name() == "temperature")) && (bct == BC::mass_inflow_outflow)) { m_field.register_custom_bc(ori); From 5f5fd23efada5efe1c7f0f48397ce21d160952fa Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Fri, 25 Oct 2024 08:50:32 -0700 Subject: [PATCH 03/10] comment out print statements for now --- amr-wind/wind_energy/ABLBoundaryPlane.cpp | 6 +++--- amr-wind/wind_energy/ABLModulatedPowerLaw.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/amr-wind/wind_energy/ABLBoundaryPlane.cpp b/amr-wind/wind_energy/ABLBoundaryPlane.cpp index 475efb7f13..997e9d7684 100644 --- a/amr-wind/wind_energy/ABLBoundaryPlane.cpp +++ b/amr-wind/wind_energy/ABLBoundaryPlane.cpp @@ -740,7 +740,7 @@ void ABLBoundaryPlane::read_header() })) { continue; } -amrex::Print() << "!!! read_header(): ori " << ori << " entered." << std::endl; +//amrex::Print() << "!!! read_header(): ori " << ori << " entered." << std::endl; m_in_data.define_plane(ori); @@ -856,7 +856,7 @@ void ABLBoundaryPlane::read_file(const bool nph_target_time) (field.bc_type()[ori] != BC::mass_inflow_outflow))) { continue; } -amrex::Print() << "!!! read_file(): ori " << ori << " entered for " << field.name() << std::endl; +//amrex::Print() << "!!! read_file(): ori " << ori << " entered for " << field.name() << std::endl; std::string facename1 = amrex::Concatenate(filename1 + '_', ori, 1); @@ -903,7 +903,7 @@ void ABLBoundaryPlane::populate_data( (fld.bc_type()[ori] != BC::mass_inflow_outflow))) { continue; } -amrex::Print() << "!!! populate_data(): ori " << ori << " entered for " << fld.name() << std::endl; +//amrex::Print() << "!!! populate_data(): ori " << ori << " entered for " << fld.name() << std::endl; // Only proceed with data population if fine levels touch the boundary if (lev > 0) { diff --git a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp index 4a3f922204..83d129ddff 100644 --- a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp +++ b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp @@ -169,7 +169,7 @@ void ABLModulatedPowerLaw::set_velocity( (bctype[ori] != BC::mass_inflow_outflow)) { continue; } -amrex::Print() << "!!! set_velocity(): ori " << ori << " entered for " << fld.name() << std::endl; +//amrex::Print() << "!!! set_velocity(): ori " << ori << " entered for " << fld.name() << std::endl; const int idir = ori.coordDir(); const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) @@ -246,7 +246,7 @@ void ABLModulatedPowerLaw::set_temperature( (bctype[ori] != BC::mass_inflow_outflow)) { continue; } -amrex::Print() << "!!! set_temperature(): ori " << ori << " entered for " << fld.name() << std::endl; +//amrex::Print() << "!!! set_temperature(): ori " << ori << " entered for " << fld.name() << std::endl; const int idir = ori.coordDir(); const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) From bf8609a61cf1d4a71fed3777793da6be8acc0b6e Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Wed, 30 Oct 2024 15:58:08 -0700 Subject: [PATCH 04/10] add new line at end of file --- amr-wind/boundary_conditions/MassInflowOutflowBC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amr-wind/boundary_conditions/MassInflowOutflowBC.cpp b/amr-wind/boundary_conditions/MassInflowOutflowBC.cpp index 1262c096b5..12d2a49a9a 100644 --- a/amr-wind/boundary_conditions/MassInflowOutflowBC.cpp +++ b/amr-wind/boundary_conditions/MassInflowOutflowBC.cpp @@ -72,4 +72,4 @@ void MassInflowOutflowBC::operator()( } } -} // namespace amr_wind \ No newline at end of file +} // namespace amr_wind From 63b76ca0fcf9be53a96eee27419fd7358d0b917e Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Wed, 30 Oct 2024 16:04:41 -0700 Subject: [PATCH 05/10] add a new test that uses inflow-outflow BC with the ABL boundary input --- .../abl_bndry_input_native_inout.inp | 89 +++++++++++++++++++ .../abl_bndry_output_native.inp | 2 +- 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 test/test_files/abl_bndry_input_native_inout/abl_bndry_input_native_inout.inp diff --git a/test/test_files/abl_bndry_input_native_inout/abl_bndry_input_native_inout.inp b/test/test_files/abl_bndry_input_native_inout/abl_bndry_input_native_inout.inp new file mode 100644 index 0000000000..1b9e042adb --- /dev/null +++ b/test/test_files/abl_bndry_input_native_inout/abl_bndry_input_native_inout.inp @@ -0,0 +1,89 @@ +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SIMULATION STOP # +#.......................................# +time.stop_time = 22000.0 # Max (simulated) time to evolve +time.max_step = 10 # Max number of time steps +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TIME STEP COMPUTATION # +#.......................................# +time.fixed_dt = 0.4 # Use this constant dt if > 0 +time.cfl = 0.95 # CFL factor +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# INPUT AND OUTPUT # +#.......................................# +io.restart_file = "../abl_bndry_output_native/chk00005" +time.plot_interval = 10 # Steps between plot files +time.checkpoint_interval = -1 # Steps between checkpoint files +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# PHYSICS # +#.......................................# +incflo.gravity = 0. 0. -9.81 # Gravitational force (3D) +incflo.density = 1.0 # Reference density +incflo.use_godunov = 1 +incflo.diffusion_type = 2 +transport.viscosity = 1.0e-5 +transport.laminar_prandtl = 0.7 +transport.turbulent_prandtl = 0.3333 +turbulence.model = Smagorinsky +Smagorinsky_coeffs.Cs = 0.135 +incflo.physics = ABL +ICNS.source_terms = CoriolisForcing GeostrophicForcing +ABL.reference_temperature = 290.0 +CoriolisForcing.east_vector = 1.0 0.0 0.0 +CoriolisForcing.north_vector = 0.0 1.0 0.0 +CoriolisForcing.latitude = 90.0 +CoriolisForcing.rotational_time_period = 125663.706143592 +GeostrophicForcing.geostrophic_wind = 10.0 0.0 0.0 +incflo.velocity = 10.0 0.0 0.0 +ABL.temperature_heights = 0.0 2000.0 +ABL.temperature_values = 290.0 290.0 +ABL.perturb_temperature = false +ABL.cutoff_height = 50.0 +ABL.perturb_velocity = true +ABL.perturb_ref_height = 50.0 +ABL.Uperiods = 4.0 +ABL.Vperiods = 4.0 +ABL.deltaU = 1.0 +ABL.deltaV = 1.0 +ABL.kappa = .41 +ABL.surface_roughness_z0 = 0.01 +ABL.bndry_file = "../abl_bndry_output_native/bndry_files" +ABL.bndry_io_mode = 1 +ABL.bndry_var_names = velocity temperature +ABL.bndry_output_format = native +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# ADAPTIVE MESH REFINEMENT # +#.......................................# +amr.n_cell = 48 48 48 # 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 = 1000. 1000. 1000. # Hi corner coordinates +geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1) +# Boundary conditions +xlo.type = "mass_inflow_outflow" +xlo.density = 1.0 +xlo.temperature = 0.0 + +xhi.type = "mass_inflow_outflow" +xhi.density = 1.0 +xhi.temperature = 0.0 + +ylo.type = "mass_inflow_outflow" +ylo.density = 1.0 +ylo.temperature = 0.0 + +yhi.type = "mass_inflow_outflow" +yhi.density = 1.0 +yhi.temperature = 0.0 + +zlo.type = "wall_model" +zhi.type = "slip_wall" +zhi.temperature_type = "fixed_gradient" +zhi.temperature = 0.0 +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# VERBOSITY # +#.......................................# +incflo.verbose = 0 # incflo_level diff --git a/test/test_files/abl_bndry_output_native/abl_bndry_output_native.inp b/test/test_files/abl_bndry_output_native/abl_bndry_output_native.inp index faf935a064..6406a17c03 100644 --- a/test/test_files/abl_bndry_output_native/abl_bndry_output_native.inp +++ b/test/test_files/abl_bndry_output_native/abl_bndry_output_native.inp @@ -48,7 +48,7 @@ ABL.kappa = .41 ABL.surface_roughness_z0 = 0.01 ABL.bndry_file = "bndry_files" ABL.bndry_io_mode = 0 -ABL.bndry_planes = ylo xlo xhi +ABL.bndry_planes = ylo xlo yhi xhi ABL.bndry_output_start_time = 2.0 ABL.bndry_var_names = velocity temperature ABL.bndry_output_format = native From dbafa8a067fccf898b50693298225cd5dd89abb2 Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Thu, 31 Oct 2024 10:37:15 -0700 Subject: [PATCH 06/10] update hydro --- submods/AMReX-Hydro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submods/AMReX-Hydro b/submods/AMReX-Hydro index 3ab98640a6..3788361fec 160000 --- a/submods/AMReX-Hydro +++ b/submods/AMReX-Hydro @@ -1 +1 @@ -Subproject commit 3ab98640a6443e541d7f37ccc0ee7e4080397b88 +Subproject commit 3788361fec234e29e6d4e8ba95010e68d9c426e7 From 94d9f7957e01dceedceec10a040c8c264d123a32 Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Thu, 31 Oct 2024 10:44:45 -0700 Subject: [PATCH 07/10] remove debug print statements --- amr-wind/wind_energy/ABLBoundaryPlane.cpp | 3 --- amr-wind/wind_energy/ABLModulatedPowerLaw.cpp | 2 -- 2 files changed, 5 deletions(-) diff --git a/amr-wind/wind_energy/ABLBoundaryPlane.cpp b/amr-wind/wind_energy/ABLBoundaryPlane.cpp index 997e9d7684..e4989e4101 100644 --- a/amr-wind/wind_energy/ABLBoundaryPlane.cpp +++ b/amr-wind/wind_energy/ABLBoundaryPlane.cpp @@ -740,7 +740,6 @@ void ABLBoundaryPlane::read_header() })) { continue; } -//amrex::Print() << "!!! read_header(): ori " << ori << " entered." << std::endl; m_in_data.define_plane(ori); @@ -856,7 +855,6 @@ void ABLBoundaryPlane::read_file(const bool nph_target_time) (field.bc_type()[ori] != BC::mass_inflow_outflow))) { continue; } -//amrex::Print() << "!!! read_file(): ori " << ori << " entered for " << field.name() << std::endl; std::string facename1 = amrex::Concatenate(filename1 + '_', ori, 1); @@ -903,7 +901,6 @@ void ABLBoundaryPlane::populate_data( (fld.bc_type()[ori] != BC::mass_inflow_outflow))) { continue; } -//amrex::Print() << "!!! populate_data(): ori " << ori << " entered for " << fld.name() << std::endl; // Only proceed with data population if fine levels touch the boundary if (lev > 0) { diff --git a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp index 83d129ddff..9b096be399 100644 --- a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp +++ b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp @@ -169,7 +169,6 @@ void ABLModulatedPowerLaw::set_velocity( (bctype[ori] != BC::mass_inflow_outflow)) { continue; } -//amrex::Print() << "!!! set_velocity(): ori " << ori << " entered for " << fld.name() << std::endl; const int idir = ori.coordDir(); const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) @@ -246,7 +245,6 @@ void ABLModulatedPowerLaw::set_temperature( (bctype[ori] != BC::mass_inflow_outflow)) { continue; } -//amrex::Print() << "!!! set_temperature(): ori " << ori << " entered for " << fld.name() << std::endl; const int idir = ori.coordDir(); const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) From 7474b75a8074aa82147ed85a8bf92dcbc56d59d8 Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Thu, 31 Oct 2024 11:19:01 -0700 Subject: [PATCH 08/10] change flow to both x and y-directions --- .../freestream_godunov_inout.inp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/test_files/freestream_godunov_inout/freestream_godunov_inout.inp b/test/test_files/freestream_godunov_inout/freestream_godunov_inout.inp index 44fad0a075..598bd7a404 100644 --- a/test/test_files/freestream_godunov_inout/freestream_godunov_inout.inp +++ b/test/test_files/freestream_godunov_inout/freestream_godunov_inout.inp @@ -43,18 +43,17 @@ io.output_default_variables = 1 amr.n_cell = 16 8 16 # Grid cells at coarsest AMRlevel amr.blocking_factor = 4 amr.max_level = 0 # Max AMR level in hierarchy -fabarray.mfiter_tile_size = 1024 1024 1024 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # GEOMETRY # #.......................................# geometry.prob_lo = 0.0 0.0 0.0 # Lo corner coordinates geometry.prob_hi = 1.0 0.5 1.0 # Hi corner coordinates -geometry.is_periodic = 0 1 0 # Periodicity x y z (0/1) +geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1) # Boundary conditions -TwoLayer.bottom_vel = -1.0 0.0 0.0 -TwoLayer.top_vel = 1.0 0.0 0.0 +TwoLayer.bottom_vel = -1.0 -0.5 0.0 +TwoLayer.top_vel = 1.0 0.5 0.0 TwoLayer.init_perturb = 0.9 TwoLayer.z_partition = 0.5 @@ -66,5 +65,13 @@ xhi.type = "mass_inflow_outflow" xhi.density = 1.0 xhi.velocity.inflow_outflow_type = TwoLayer +ylo.type = "mass_inflow_outflow" +ylo.density = 1.0 +ylo.velocity.inflow_outflow_type = TwoLayer + +yhi.type = "mass_inflow_outflow" +yhi.density = 1.0 +yhi.velocity.inflow_outflow_type = TwoLayer + zlo.type = "slip_wall" zhi.type = "slip_wall" From 6a1e13a19edabd8cb6f1d7f661a85d262e6e6e45 Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Thu, 31 Oct 2024 11:20:45 -0700 Subject: [PATCH 09/10] add new test to cmake --- test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 15f66d6989..7c474209b8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -321,6 +321,7 @@ endif() # Regression tests excluded from CI with a test dependency #============================================================================= add_test_red(abl_bndry_input_native abl_bndry_output_native) +add_test_red(abl_bndry_input_native_inout abl_bndry_output_native) add_test_red(abl_godunov_restart abl_godunov) add_test_red(abl_bndry_input_amr_native abl_bndry_output_native) add_test_red(abl_bndry_input_amr_native_xhi abl_bndry_output_native) From a61c136743414c9b39ce425b18f543fe5262a9c6 Mon Sep 17 00:00:00 2001 From: Mukul Dave Date: Thu, 31 Oct 2024 11:23:08 -0700 Subject: [PATCH 10/10] formatting --- amr-wind/boundary_conditions/BCInterface.cpp | 5 +++-- amr-wind/wind_energy/ABLBoundaryPlane.cpp | 5 +++-- amr-wind/wind_energy/ABLFillInflow.cpp | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/amr-wind/boundary_conditions/BCInterface.cpp b/amr-wind/boundary_conditions/BCInterface.cpp index ffb42c4b55..6e3c92514f 100644 --- a/amr-wind/boundary_conditions/BCInterface.cpp +++ b/amr-wind/boundary_conditions/BCInterface.cpp @@ -102,8 +102,9 @@ void BCIface::set_bcfuncs() m_field.register_custom_bc(ori); } - if (((m_field.name() == "velocity") || (m_field.name() == "temperature")) - && (bct == BC::mass_inflow_outflow)) { + if (((m_field.name() == "velocity") || + (m_field.name() == "temperature")) && + (bct == BC::mass_inflow_outflow)) { m_field.register_custom_bc(ori); } diff --git a/amr-wind/wind_energy/ABLBoundaryPlane.cpp b/amr-wind/wind_energy/ABLBoundaryPlane.cpp index e4989e4101..d0a961888e 100644 --- a/amr-wind/wind_energy/ABLBoundaryPlane.cpp +++ b/amr-wind/wind_energy/ABLBoundaryPlane.cpp @@ -735,8 +735,9 @@ void ABLBoundaryPlane::read_header() if (std::all_of( m_fields.begin(), m_fields.end(), [ori](const auto* fld) { - return ((fld->bc_type()[ori] != BC::mass_inflow) && - (fld->bc_type()[ori] != BC::mass_inflow_outflow)); + return ( + (fld->bc_type()[ori] != BC::mass_inflow) && + (fld->bc_type()[ori] != BC::mass_inflow_outflow)); })) { continue; } diff --git a/amr-wind/wind_energy/ABLFillInflow.cpp b/amr-wind/wind_energy/ABLFillInflow.cpp index 3de9b766c7..a8722a17d0 100644 --- a/amr-wind/wind_energy/ABLFillInflow.cpp +++ b/amr-wind/wind_energy/ABLFillInflow.cpp @@ -76,8 +76,7 @@ void ABLFillInflow::fillpatch_sibling_fields( const auto bct = ibctype[ori]; const int dir = ori.coordDir(); for (int i = 0; i < m_field.num_comp(); ++i) { - if ((bct == BC::mass_inflow) || - (bct == BC::mass_inflow_outflow)) { + if ((bct == BC::mass_inflow) || (bct == BC::mass_inflow_outflow)) { if (side == amrex::Orientation::low) { ph_bcrec[i].setLo(dir, amrex::BCType::foextrap); fp_bcrec[i].setLo(