From b9c3910b97770eca2c76da517e3d33527c4e5416 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Thu, 10 Apr 2025 09:40:22 -0600 Subject: [PATCH 01/19] read mesh velocity into symbc --- src/Inciter/ALECG.cpp | 2 +- src/Inciter/NodeDiagnostics.cpp | 3 ++- src/Inciter/OversetFE.cpp | 2 +- src/PDE/CGPDE.hpp | 7 +++++-- src/PDE/CompFlow/CGCompFlow.hpp | 2 ++ src/PDE/Transport/CGTransport.hpp | 1 + 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Inciter/ALECG.cpp b/src/Inciter/ALECG.cpp index aa53e57aa96..fc0d7074e90 100644 --- a/src/Inciter/ALECG.cpp +++ b/src/Inciter/ALECG.cpp @@ -869,7 +869,7 @@ ALECG::BC() if (bc[c].first) m_u(b,c) = bc[c].second; // Apply symmetry BCs - g_cgpde[d->MeshId()].symbc( m_u, coord, m_bnorm, m_symbcnodes ); + g_cgpde[d->MeshId()].symbc( m_u, d->MeshVel(), coord, m_bnorm, m_symbcnodes ); // Apply farfield BCs g_cgpde[d->MeshId()].farfieldbc( m_u, coord, m_bnorm, m_farfieldbcnodes ); diff --git a/src/Inciter/NodeDiagnostics.cpp b/src/Inciter/NodeDiagnostics.cpp index 393465011a6..335761b6f16 100644 --- a/src/Inciter/NodeDiagnostics.cpp +++ b/src/Inciter/NodeDiagnostics.cpp @@ -95,6 +95,7 @@ NodeDiagnostics::compute( // Evaluate analytic solution (if exist, if not, IC) auto an = u; + auto mv = d.MeshVel(); for (std::size_t i=0; i a; @@ -104,7 +105,7 @@ NodeDiagnostics::compute( for (std::size_t c=0; cMeshId()].symbc( m_u, coord, m_bnorm, m_symbcnodes ); + g_cgpde[d->MeshId()].symbc( m_u, d->MeshVel(), coord, m_bnorm, m_symbcnodes ); // Apply farfield BCs if (bci.get< tag::farfield >().empty() || (d->MeshId() == 0)) { diff --git a/src/PDE/CGPDE.hpp b/src/PDE/CGPDE.hpp index afbb6f6544a..bf12b9c731e 100644 --- a/src/PDE/CGPDE.hpp +++ b/src/PDE/CGPDE.hpp @@ -218,12 +218,13 @@ class CGPDE { //! Public interface to set symmetry boundary conditions at nodes void symbc( tk::Fields& U, + tk::Fields& W, const std::array< std::vector< real >, 3 >& coord, const std::unordered_map< int, std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, const std::unordered_set< std::size_t >& nodes ) const - { self->symbc( U, coord, bnorm, nodes ); } + { self->symbc( U, W, coord, bnorm, nodes ); } //! Public interface to set farfield boundary conditions at nodes void @@ -385,6 +386,7 @@ class CGPDE { bool ) const = 0; virtual void symbc( tk::Fields& U, + tk::Fields& W, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, @@ -520,12 +522,13 @@ class CGPDE { increment ); } void symbc( tk::Fields& U, + tk::Fields& W, const std::array< std::vector< real >, 3 >& coord, const std::unordered_map< int, std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, const std::unordered_set< std::size_t >& nodes ) const override - { data.symbc( U, coord, bnorm, nodes ); } + { data.symbc( U, W, coord, bnorm, nodes ); } void farfieldbc( tk::Fields& U, const std::array< std::vector< real >, 3 >& coord, diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index ae944f19d6e..c6a55eca80e 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -750,11 +750,13 @@ class CompFlow { //! Set symmetry boundary conditions at nodes //! \param[in] U Solution vector at recent time step + //! \param[in] W Mesh velocity //! \param[in] bnorm Face normals in boundary points, key local node id, //! first 3 reals of value: unit normal, outer key: side set id //! \param[in] nodes Unique set of node ids at which to set symmetry BCs void symbc( tk::Fields& U, + tk::Fields& W, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, diff --git a/src/PDE/Transport/CGTransport.hpp b/src/PDE/Transport/CGTransport.hpp index dd6bb33c62d..5f9dad88d20 100644 --- a/src/PDE/Transport/CGTransport.hpp +++ b/src/PDE/Transport/CGTransport.hpp @@ -397,6 +397,7 @@ class Transport { //! Set symmetry boundary conditions at nodes void symbc( + tk::Fields&, tk::Fields&, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, From 90c1f9aaf3862aa2d4938462cbbd86635a8da20a Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Mon, 14 Apr 2025 11:47:05 -0600 Subject: [PATCH 02/19] calculate symmetry based on relative velocity --- src/PDE/CompFlow/CGCompFlow.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index c6a55eca80e..45b91d61a43 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include "DerivedData.hpp" #include "Exception.hpp" @@ -780,12 +781,12 @@ class CompFlow { if (i != end(j->second)) { std::array< real, 3 > n{ i->second[0], i->second[1], i->second[2] }, - v{ U(p,1), U(p,2), U(p,3) }; - auto v_dot_n = tk::dot( v, n ); - // symbc: remove normal component of velocity - U(p,1) -= v_dot_n * n[0]; - U(p,2) -= v_dot_n * n[1]; - U(p,3) -= v_dot_n * n[2]; + rel_v{ U(p,1) - W(p,0), U(p,2) - W(p,1), U(p,3) - W(p,2) }; + auto rel_v_dot_n = tk::dot( rel_v, n ); + // symbc: remove normal component of relative velocity + U(p,1) -= rel_v_dot_n * n[0]; + U(p,2) -= rel_v_dot_n * n[1]; + U(p,3) -= rel_v_dot_n * n[2]; } } } From 0c4cfe369ea9c2331bfaa01252e20f7837e51eac Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Mon, 14 Apr 2025 13:15:52 -0600 Subject: [PATCH 03/19] use consistent, const mesh velocity value across all schemes --- src/Inciter/ALECG.cpp | 2 +- src/Inciter/NodeDiagnostics.cpp | 2 +- src/Inciter/OversetFE.cpp | 4 ++-- src/PDE/CGPDE.hpp | 6 +++--- src/PDE/CompFlow/CGCompFlow.hpp | 2 +- src/PDE/Transport/CGTransport.hpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Inciter/ALECG.cpp b/src/Inciter/ALECG.cpp index fc0d7074e90..7a2e900e1b1 100644 --- a/src/Inciter/ALECG.cpp +++ b/src/Inciter/ALECG.cpp @@ -869,7 +869,7 @@ ALECG::BC() if (bc[c].first) m_u(b,c) = bc[c].second; // Apply symmetry BCs - g_cgpde[d->MeshId()].symbc( m_u, d->MeshVel(), coord, m_bnorm, m_symbcnodes ); + g_cgpde[d->MeshId()].symbc( m_u, d->meshvel(), coord, m_bnorm, m_symbcnodes ); // Apply farfield BCs g_cgpde[d->MeshId()].farfieldbc( m_u, coord, m_bnorm, m_farfieldbcnodes ); diff --git a/src/Inciter/NodeDiagnostics.cpp b/src/Inciter/NodeDiagnostics.cpp index 335761b6f16..8bacb9806bf 100644 --- a/src/Inciter/NodeDiagnostics.cpp +++ b/src/Inciter/NodeDiagnostics.cpp @@ -95,7 +95,7 @@ NodeDiagnostics::compute( // Evaluate analytic solution (if exist, if not, IC) auto an = u; - auto mv = d.MeshVel(); + auto mv = d.meshvel(); for (std::size_t i=0; i a; diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index 8761ddbbc62..d17b5124914 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -928,7 +928,7 @@ OversetFE::BC() if (bc[c].first) m_u(b,c) = bc[c].second; // Apply symmetry BCs - g_cgpde[d->MeshId()].symbc( m_u, d->MeshVel(), coord, m_bnorm, m_symbcnodes ); + g_cgpde[d->MeshId()].symbc( m_u, d->meshvel(), coord, m_bnorm, m_symbcnodes ); // Apply farfield BCs if (bci.get< tag::farfield >().empty() || (d->MeshId() == 0)) { @@ -1130,7 +1130,7 @@ OversetFE::rhs() g_cgpde[d->MeshId()].rhs( d->T() + prev_rkcoef * d->Dt(), d->Coord(), d->Inpoel(), m_triinpoel, d->Gid(), d->Bid(), d->Lid(), m_dfn, m_psup, m_esup, m_symbctri, d->Vol(), m_edgenode, m_edgeid, - m_boxnodes, m_chBndGrad, m_u, d->MeshVel(), m_tp, d->Boxvol(), + m_boxnodes, m_chBndGrad, m_u, d->meshvel(), m_tp, d->Boxvol(), m_rhs ); if (steady) for (std::size_t p=0; p, 3 >& coord, const std::unordered_map< int, std::unordered_map< std::size_t, @@ -386,7 +386,7 @@ class CGPDE { bool ) const = 0; virtual void symbc( tk::Fields& U, - tk::Fields& W, + const tk::Fields& W, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, @@ -522,7 +522,7 @@ class CGPDE { increment ); } void symbc( tk::Fields& U, - tk::Fields& W, + const tk::Fields& W, const std::array< std::vector< real >, 3 >& coord, const std::unordered_map< int, std::unordered_map< std::size_t, diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index 45b91d61a43..3e02d912f5f 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -757,7 +757,7 @@ class CompFlow { //! \param[in] nodes Unique set of node ids at which to set symmetry BCs void symbc( tk::Fields& U, - tk::Fields& W, + const tk::Fields& W, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, diff --git a/src/PDE/Transport/CGTransport.hpp b/src/PDE/Transport/CGTransport.hpp index 5f9dad88d20..c59ead9d37b 100644 --- a/src/PDE/Transport/CGTransport.hpp +++ b/src/PDE/Transport/CGTransport.hpp @@ -398,7 +398,7 @@ class Transport { void symbc( tk::Fields&, - tk::Fields&, + const tk::Fields&, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, From 71b5c3c397b011b2039aaf68ab884edcb0f9e65b Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Mon, 14 Apr 2025 13:18:49 -0600 Subject: [PATCH 04/19] remove iostream I used for debugging --- src/PDE/CompFlow/CGCompFlow.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index 3e02d912f5f..aeb69eaff40 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #include "DerivedData.hpp" #include "Exception.hpp" From feb322cfaf076b663fa20c10e1ebeeeb2a26b19f Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Wed, 16 Apr 2025 07:54:05 -0600 Subject: [PATCH 05/19] overset mesh coordinate updates are taken from coordinate value at start of timestep --- src/Inciter/OversetFE.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index d17b5124914..3f9d0657625 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -1196,6 +1196,7 @@ OversetFE::solve() // Update state at time n if (m_stage == 0) { m_un = m_u; + d->UpdateCoordn(); } // Explicit time-stepping using RK3 @@ -1283,28 +1284,28 @@ OversetFE::solve() // rectilinear motion // --------------------------------------------------------------------- - std::array< tk::real, 3 > ds{{ 0, 0, 0 }}; - for (std::size_t i=0; i<3; ++i) { - // mesh displacement - ds[i] = m_centMassVel[i]*dtp + 0.5*a_mesh[i]*dtp*dtp; - // mesh velocity - u_mesh(p,i) += a_mesh[i]*dtp; - } - - // add contribution of rotation to mesh velocity - u_mesh(p,i1) += a1*dtp; - u_mesh(p,i2) += a2*dtp; // add contribution of rotation to mesh displacement std::array< tk::real, 3 > angles{{ 0, 0, 0 }}; angles[sym_dir] = dtheta * 180.0/pi; tk::rotatePoint(angles, rCM); - // combine both contributions + tk::real dsT, dsR; + for (std::size_t i=0; i<3; ++i) { - d->Coord()[i][p] = rCM[i] + m_centMass[i]; - d->Coord()[i][p] += ds[i]; + // mesh displacement from translation + dsT = m_centMassVel[i]*dtp + 0.5*a_mesh[i]*dtp*dtp; + // mesh displacement from rotation + dsR = rCM[i] + m_centMass[i] - d->Coord()[i][p]; + // add both contributions + d->Coord()[i][p] = d->Coordn()[i][p] + dsT + dsR; + // mesh velocity change from translation + u_mesh(p,i) += a_mesh[i]*dtp; } + + // add contribution of rotation to mesh velocity + u_mesh(p,i1) += a1*dtp; + u_mesh(p,i2) += a2*dtp; } // update angular velocity From fec43a25796fc1cd17da355b487bb89cae3b8526 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Wed, 16 Apr 2025 08:05:01 -0600 Subject: [PATCH 06/19] rename meshvel to MeshVel in some spots for consistency --- src/Inciter/NodeDiagnostics.cpp | 2 +- src/Inciter/OversetFE.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Inciter/NodeDiagnostics.cpp b/src/Inciter/NodeDiagnostics.cpp index 8bacb9806bf..335761b6f16 100644 --- a/src/Inciter/NodeDiagnostics.cpp +++ b/src/Inciter/NodeDiagnostics.cpp @@ -95,7 +95,7 @@ NodeDiagnostics::compute( // Evaluate analytic solution (if exist, if not, IC) auto an = u; - auto mv = d.meshvel(); + auto mv = d.MeshVel(); for (std::size_t i=0; i a; diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index 3f9d0657625..117250a1f92 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -928,7 +928,7 @@ OversetFE::BC() if (bc[c].first) m_u(b,c) = bc[c].second; // Apply symmetry BCs - g_cgpde[d->MeshId()].symbc( m_u, d->meshvel(), coord, m_bnorm, m_symbcnodes ); + g_cgpde[d->MeshId()].symbc( m_u, d->MeshVel(), coord, m_bnorm, m_symbcnodes ); // Apply farfield BCs if (bci.get< tag::farfield >().empty() || (d->MeshId() == 0)) { @@ -1130,7 +1130,7 @@ OversetFE::rhs() g_cgpde[d->MeshId()].rhs( d->T() + prev_rkcoef * d->Dt(), d->Coord(), d->Inpoel(), m_triinpoel, d->Gid(), d->Bid(), d->Lid(), m_dfn, m_psup, m_esup, m_symbctri, d->Vol(), m_edgenode, m_edgeid, - m_boxnodes, m_chBndGrad, m_u, d->meshvel(), m_tp, d->Boxvol(), + m_boxnodes, m_chBndGrad, m_u, d->MeshVel(), m_tp, d->Boxvol(), m_rhs ); if (steady) for (std::size_t p=0; p Date: Thu, 17 Apr 2025 09:43:40 -0600 Subject: [PATCH 07/19] correctly update center of mass between time steps --- src/Inciter/OversetFE.cpp | 35 +++++++++++++++++++++++++---------- src/Inciter/OversetFE.hpp | 12 ++++++++++++ 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index 117250a1f92..a000722abac 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -100,7 +100,10 @@ OversetFE::OversetFE( const CProxy_Discretization& disc, m_surfTorque({{0, 0, 0}}), m_centMass({{0, 0, 0}}), m_centMassVel({{0, 0, 0}}), - m_angVelMesh(0) + m_angVelMesh(0), + m_centMassn({{0, 0, 0}}), + m_centMassVeln({{0, 0, 0}}), + m_angVelMeshn(0) // ***************************************************************************** // Constructor //! \param[in] disc Discretization proxy @@ -943,6 +946,17 @@ OversetFE::BC() } } +void +OversetFE::UpdateCenterOfMass() +// ***************************************************************************** +// Update quantities associated with the center of mass at a new time step +// ***************************************************************************** +{ + m_centMassn = m_centMass; + m_centMassVeln = m_centMassVel; + m_angVelMeshn = m_angVelMesh; +} + void OversetFE::next() // ***************************************************************************** @@ -1197,6 +1211,7 @@ OversetFE::solve() if (m_stage == 0) { m_un = m_u; d->UpdateCoordn(); + UpdateCenterOfMass(); } // Explicit time-stepping using RK3 @@ -1258,9 +1273,9 @@ OversetFE::solve() // rotation (this is currently only configured for planar motion) // --------------------------------------------------------------------- std::array< tk::real, 3 > rCM{{ - d->Coord()[0][p] - m_centMass[0], - d->Coord()[1][p] - m_centMass[1], - d->Coord()[2][p] - m_centMass[2] }}; + d->Coord()[0][p] - m_centMassn[0], + d->Coord()[1][p] - m_centMassn[1], + d->Coord()[2][p] - m_centMassn[2] }}; // obtain tangential velocity tk::real r_mag(0.0); @@ -1282,14 +1297,14 @@ OversetFE::solve() // angle of rotation auto dtheta = m_angVelMesh*dtp + 0.5*alpha_mesh*dtp*dtp; - // rectilinear motion - // --------------------------------------------------------------------- - // add contribution of rotation to mesh displacement std::array< tk::real, 3 > angles{{ 0, 0, 0 }}; angles[sym_dir] = dtheta * 180.0/pi; tk::rotatePoint(angles, rCM); + // rectilinear motion + // --------------------------------------------------------------------- + tk::real dsT, dsR; for (std::size_t i=0; i<3; ++i) { @@ -1309,12 +1324,12 @@ OversetFE::solve() } // update angular velocity - m_angVelMesh += alpha_mesh*dtp; + m_angVelMesh = m_angVelMeshn + alpha_mesh*dtp; // move center of mass for (std::size_t i=0; i<3; ++i) { - m_centMass[i] += m_centMassVel[i]*dtp + 0.5*a_mesh[i]*dtp*dtp; - m_centMassVel[i] += a_mesh[i]*dtp; // no rotational component + m_centMass[i] = m_centMassn[i] + m_centMassVel[i]*dtp + 0.5*a_mesh[i]*dtp*dtp; + m_centMassVel[i] = m_centMassVeln[i] + a_mesh[i]*dtp; // no rotational component } } diff --git a/src/Inciter/OversetFE.hpp b/src/Inciter/OversetFE.hpp index dbb85d21778..868b5dff1e6 100644 --- a/src/Inciter/OversetFE.hpp +++ b/src/Inciter/OversetFE.hpp @@ -242,6 +242,9 @@ class OversetFE : public CBase_OversetFE { p | m_centMass; p | m_centMassVel; p | m_angVelMesh; + p | m_centMassn; + p | m_centMassVeln; + p | m_angVelMeshn; } //! \brief Pack/Unpack serialize operator| //! \param[in,out] p Charm++'s PUP::er serializer object reference @@ -381,6 +384,12 @@ class OversetFE : public CBase_OversetFE { std::array< tk::real, 3 > m_centMassVel; //! Angular velocity of the rigid body tk::real m_angVelMesh; + //! Center of mass of rigid body at time n + std::array< tk::real, 3 > m_centMassn; + //! Velocity of the center of mass of rigid body at time n + std::array< tk::real, 3 > m_centMassVeln; + //! Angular velocity of the rigid body at time n + tk::real m_angVelMeshn; //! Access bound Discretization class pointer Discretization* Disc() const { @@ -453,6 +462,9 @@ class OversetFE : public CBase_OversetFE { //! Apply boundary conditions void BC(); + + //! Update quantities associated with the center of mass at a new time step + void UpdateCenterOfMass(); }; } // inciter:: From 7b039e8c512f75fb5f5885da8b9ea8839e3a2fb7 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Thu, 17 Apr 2025 09:45:29 -0600 Subject: [PATCH 08/19] correctly update rotation movement to be from Coordn --- src/Inciter/OversetFE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index a000722abac..9c6c976654d 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -1311,7 +1311,7 @@ OversetFE::solve() // mesh displacement from translation dsT = m_centMassVel[i]*dtp + 0.5*a_mesh[i]*dtp*dtp; // mesh displacement from rotation - dsR = rCM[i] + m_centMass[i] - d->Coord()[i][p]; + dsR = rCM[i] + m_centMass[i] - d->Coordn()[i][p]; // add both contributions d->Coord()[i][p] = d->Coordn()[i][p] + dsT + dsR; // mesh velocity change from translation From ac0e61d94b12c827e92a1d83c60cc37d6c2fc331 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Fri, 18 Apr 2025 07:55:25 -0600 Subject: [PATCH 09/19] add slipwall keyword --- src/Control/Inciter/InputDeck/InputDeck.hpp | 9 ++++++++- src/Control/Inciter/InputDeck/LuaParser.cpp | 3 +++ src/Control/Tags.hpp | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Control/Inciter/InputDeck/InputDeck.hpp b/src/Control/Inciter/InputDeck/InputDeck.hpp index e9c84643801..796f2770767 100644 --- a/src/Control/Inciter/InputDeck/InputDeck.hpp +++ b/src/Control/Inciter/InputDeck/InputDeck.hpp @@ -50,7 +50,8 @@ using bclist = tk::TaggedTuple< brigand::list< tag::outlet, std::vector< std::size_t >, tag::farfield, std::vector< std::size_t >, tag::extrapolate, std::vector< std::size_t >, - tag::noslipwall, std::vector< std::size_t > + tag::noslipwall, std::vector< std::size_t >, + tag::slipwall, std::vector< std::size_t > > >; // Transport @@ -146,6 +147,7 @@ using bcList = tk::TaggedTuple< brigand::list< tag::farfield, std::vector< std::size_t >, tag::extrapolate, std::vector< std::size_t >, tag::noslipwall, std::vector< std::size_t >, + tag::slipwall, std::vector< std::size_t >, tag::velocity, std::vector< tk::real >, tag::pressure, tk::real, tag::density, tk::real, @@ -1730,6 +1732,11 @@ class InputDeck : public tk::TaggedTuple< ConfigMembers > { R"(This keyword is used to list (multiple) no-slip wall BC sidesets.)", "vector of uint(s)"}); + keywords.insert({"slipwall", + "List sidesets with slip wall boundary conditions", + R"(This keyword is used to list (multiple) slip wall BC sidesets.)", + "vector of uint(s)"}); + keywords.insert({"timedep", "Start configuration block describing time dependent boundary conditions", R"(This keyword is used to introduce a bc_timedep block, used to diff --git a/src/Control/Inciter/InputDeck/LuaParser.cpp b/src/Control/Inciter/InputDeck/LuaParser.cpp index 55567dda74e..9b375e55d70 100644 --- a/src/Control/Inciter/InputDeck/LuaParser.cpp +++ b/src/Control/Inciter/InputDeck/LuaParser.cpp @@ -1253,6 +1253,9 @@ LuaParser::storeInputDeck( storeVecIfSpecd< uint64_t >(sol_bc[i+1], "noslipwall", bc_deck[i].get< tag::noslipwall >(), {}); + storeVecIfSpecd< uint64_t >(sol_bc[i+1], "slipwall", + bc_deck[i].get< tag::slipwall >(), {}); + // Time-dependent BC if (sol_bc[i+1]["timedep"].valid()) { const sol::table& sol_tdbc = sol_bc[i+1]["timedep"]; diff --git a/src/Control/Tags.hpp b/src/Control/Tags.hpp index 1aa6e39255d..2d343033ce4 100644 --- a/src/Control/Tags.hpp +++ b/src/Control/Tags.hpp @@ -291,6 +291,7 @@ DEFTAG(farfield); DEFTAG(extrapolate); DEFTAG(noslipwall); DEFTAG(timedep); +DEFTAG(slipwall); DEFTAG(rigid_body_motion); DEFTAG(rigid_body_movt); From 01ad5849c4feb6f14cf79d28f7b6af7256c1da2f Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Fri, 18 Apr 2025 09:11:59 -0600 Subject: [PATCH 10/19] add slipwallbc function --- src/PDE/CGPDE.hpp | 28 ++++++++++++++++++++ src/PDE/CompFlow/CGCompFlow.hpp | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/src/PDE/CGPDE.hpp b/src/PDE/CGPDE.hpp index c2786893350..c8047d15807 100644 --- a/src/PDE/CGPDE.hpp +++ b/src/PDE/CGPDE.hpp @@ -236,6 +236,17 @@ class CGPDE { const std::unordered_set< std::size_t >& nodes ) const { self->farfieldbc( U, coord, bnorm, nodes ); } + //! Public interface to set slip wall boundary conditions at nodes + void + slipwallbc( tk::Fields& U, + const tk::Fields& W, + const std::array< std::vector< real >, 3 >& coord, + const std::unordered_map< int, + std::unordered_map< std::size_t, + std::array< real, 4 > > >& bnorm, + const std::unordered_set< std::size_t >& nodes ) const + { self->slipwallbc( U, W, coord, bnorm, nodes ); } + //! Public interface to applying time dependent boundary conditions at nodes void timedepbc( tk::real t, @@ -399,6 +410,14 @@ class CGPDE { std::unordered_map< std::size_t, std::array< real, 4 > > >&, const std::unordered_set< std::size_t >& ) const = 0; + virtual void slipwallbc( + tk::Fields& U, + const tk::Fields& W, + const std::array< std::vector< real >, 3 >&, + const std::unordered_map< int, + std::unordered_map< std::size_t, + std::array< real, 4 > > >&, + const std::unordered_set< std::size_t >& ) const = 0; virtual void timedepbc( tk::real, tk::Fields&, @@ -537,6 +556,15 @@ class CGPDE { std::array< real, 4 > > >& bnorm, const std::unordered_set< std::size_t >& nodes ) const override { data.farfieldbc( U, coord, bnorm, nodes ); } + void slipwallbc( + tk::Fields& U, + const tk::Fields& W, + const std::array< std::vector< real >, 3 >& coord, + const std::unordered_map< int, + std::unordered_map< std::size_t, + std::array< real, 4 > > >& bnorm, + const std::unordered_set< std::size_t >& nodes ) const override + { data.slipwallbc( U, W, coord, bnorm, nodes ); } void timedepbc( tk::real t, diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index aeb69eaff40..6eb4311c3cd 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -856,6 +856,51 @@ class CompFlow { } } + //! Set slip wall boundary conditions at nodes + //! \param[in] U Solution vector at recent time step + //! \param[in] W Mesh velocity + //! \param[in] bnorm Face normals in boundary points, key local node id, + //! first 3 reals of value: unit normal, outer key: side set id + //! \param[in] nodes Unique set of node ids at which to set slip BCs + void + slipwallbc( tk::Fields& U, + const tk::Fields& W, + const std::array< std::vector< real >, 3 >&, + const std::unordered_map< int, + std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, + const std::unordered_set< std::size_t >& nodes ) const + { + // collect sidesets across all meshes + std::vector< std::size_t > swbc; + for (const auto& ibc : g_inputdeck.get< tag::bc >()) { + swbc.insert(swbc.end(), ibc.get< tag::slipwall >().begin(), + ibc.get< tag::slipwall >().end()); + } + + if (swbc.size() > 0) { // use slip bcs for this system + for (auto p : nodes) { // for all slipbc nodes + // for all user-def slipbc sets + for (std::size_t s=0; s(swbc[s])); + if (j != end(bnorm)) { + auto i = j->second.find(p); // find normal for node + if (i != end(j->second)) { + std::array< real, 3 > + n{ i->second[0], i->second[1], i->second[2] }, + rel_v{ U(p,1) - W(p,0), U(p,2) - W(p,1), U(p,3) - W(p,2) }; + auto rel_v_dot_n = tk::dot( rel_v, n ); + // slip wall bc: remove normal component of relative velocity + U(p,1) -= rel_v_dot_n * n[0]; + U(p,2) -= rel_v_dot_n * n[1]; + U(p,3) -= rel_v_dot_n * n[2]; + } + } + } + } + } + } + //! Apply user defined time dependent BCs //! \param[in] t Physical time //! \param[in,out] U Solution vector at recent time step From b8012ddeee6e9e85e11fb04d5591951e55e18760 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Fri, 18 Apr 2025 09:19:24 -0600 Subject: [PATCH 11/19] add slipwallbc function declaration --- src/PDE/Transport/CGTransport.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/PDE/Transport/CGTransport.hpp b/src/PDE/Transport/CGTransport.hpp index c59ead9d37b..7c1301aabb6 100644 --- a/src/PDE/Transport/CGTransport.hpp +++ b/src/PDE/Transport/CGTransport.hpp @@ -414,6 +414,17 @@ class Transport { std::array< real, 4 > > >&, const std::unordered_set< std::size_t >& ) const {} + //! Set slip wall boundary conditions at nodes + void + slipwallbc( + tk::Fields&, + const tk::Fields&, + const std::array< std::vector< real >, 3 >&, + const std::unordered_map< int, + std::unordered_map< std::size_t, + std::array< real, 4 > > >&, + const std::unordered_set< std::size_t >& ) const {} + //! Apply user defined time dependent BCs (no-op for transport) void timedepbc( tk::real, From b99de0c5a5fbc751d6dd488b5529257835255fca Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Fri, 18 Apr 2025 09:23:37 -0600 Subject: [PATCH 12/19] add slip wall BC functionality to CG files --- src/Inciter/ALECG.cpp | 31 +++++++++++++++++++++---- src/Inciter/ALECG.hpp | 3 +++ src/Inciter/NodeDiagnostics.cpp | 6 ++++- src/Inciter/NodeDiagnostics.hpp | 3 ++- src/Inciter/OversetFE.cpp | 41 ++++++++++++++++++++++++++++----- src/Inciter/OversetFE.hpp | 6 +++++ 6 files changed, 77 insertions(+), 13 deletions(-) diff --git a/src/Inciter/ALECG.cpp b/src/Inciter/ALECG.cpp index 7a2e900e1b1..ac426e2a945 100644 --- a/src/Inciter/ALECG.cpp +++ b/src/Inciter/ALECG.cpp @@ -81,6 +81,7 @@ ALECG::ALECG( const CProxy_Discretization& disc, m_bnormc(), m_symbcnodes(), m_farfieldbcnodes(), + m_slipwallbcnodes(), m_symbctri(), m_timedepbcnodes(), m_timedepbcFn(), @@ -173,13 +174,28 @@ ALECG::queryBnd() for (const auto& [s,nodes] : far) m_farfieldbcnodes.insert( begin(nodes), end(nodes) ); - // If farfield BC is set on a node, will not also set symmetry BC - for (auto fn : m_farfieldbcnodes) m_symbcnodes.erase(fn); + // Prepare unique set of slip wall BC nodes + auto slip = d->bcnodes< tag::slipwall >( m_bface, m_triinpoel ); + for (const auto& [s,nodes] : slip) + m_slipwallbcnodes.insert( begin(nodes), end(nodes) ); - // Prepare boundary nodes contiguously accessible from a triangle-face loop + // If farfield BC is set on a node, will not also set symmetry and slip BC + for (auto fn : m_farfieldbcnodes) { + m_symbcnodes.erase(fn); + m_slipwallbcnodes.erase(fn); + } + + // If symmetry BC is set on a node, will not also set slip BC + for (auto fn : m_symbcnodes) { + m_slipwallbcnodes.erase(fn); + } + + // Prepare boundary nodes contiguously accessible from a triangle-face loop, + // which contain both symmetry and no slip walls m_symbctri.resize( m_triinpoel.size()/3, 0 ); for (std::size_t e=0; eMeshId()].farfieldbc( m_u, coord, m_bnorm, m_farfieldbcnodes ); + // Apply slip wall BCs + g_cgpde[d->MeshId()].slipwallbc( m_u, d->meshvel(), coord, m_bnorm, + m_slipwallbcnodes ); + // Apply user defined time dependent BCs g_cgpde[d->MeshId()].timedepbc( d->T(), m_u, m_timedepbcnodes, m_timedepbcFn ); @@ -1201,7 +1221,8 @@ ALECG::ale() conserved( m_u, Disc()->Vol() ); conserved( m_un, Disc()->Voln() ); auto diag_computed = m_diag.compute( *d, m_u, m_un, m_bnorm, - m_symbcnodes, m_farfieldbcnodes ); + m_symbcnodes, m_farfieldbcnodes, + m_slipwallbcnodes ); volumetric( m_u, Disc()->Vol() ); volumetric( m_un, Disc()->Voln() ); // Increase number of iterations and physical time diff --git a/src/Inciter/ALECG.hpp b/src/Inciter/ALECG.hpp index 470f9e58b1d..2160c178880 100644 --- a/src/Inciter/ALECG.hpp +++ b/src/Inciter/ALECG.hpp @@ -234,6 +234,7 @@ class ALECG : public CBase_ALECG { p | m_bnormc; p | m_symbcnodes; p | m_farfieldbcnodes; + p | m_slipwallbcnodes; p | m_symbctri; p | m_timedepbcnodes; p | m_timedepbcFn; @@ -334,6 +335,8 @@ class ALECG : public CBase_ALECG { std::unordered_set< std::size_t > m_symbcnodes; //! Unique set of nodes at which farfield BCs are set std::unordered_set< std::size_t > m_farfieldbcnodes; + //! Unique set of nodes at which slip wall BCs are set + std::unordered_set< std::size_t > m_slipwallbcnodes; //! Vector with 1 at symmetry BC boundary triangles std::vector< int > m_symbctri; //! \brief Unique set of nodes at which time dependent BCs are set diff --git a/src/Inciter/NodeDiagnostics.cpp b/src/Inciter/NodeDiagnostics.cpp index 335761b6f16..f6ad5efa62a 100644 --- a/src/Inciter/NodeDiagnostics.cpp +++ b/src/Inciter/NodeDiagnostics.cpp @@ -53,7 +53,8 @@ NodeDiagnostics::compute( const std::unordered_map< int, std::unordered_map< std::size_t, std::array< tk::real, 4 > > >& bnorm, const std::unordered_set< std::size_t >& symbcnodes, - const std::unordered_set< std::size_t >& farfieldbcnodes ) const + const std::unordered_set< std::size_t >& farfieldbcnodes, + const std::unordered_set< std::size_t >& slipwallbcnodes ) const // ***************************************************************************** // Compute diagnostics, e.g., residuals, norms of errors, etc. //! \param[in] d Discretization proxy to read from @@ -64,6 +65,7 @@ NodeDiagnostics::compute( //! \param[in] symbcnodes Unique set of node ids at which to set symmetry BCs //! \param[in] farfieldbcnodes Unique set of node ids at which to set farfield //! BCs +//! \param[in] slipwallbcnodes Unique set of node ids at which to set slip BCs //! \return True if diagnostics have been computed //! \details Diagnostics are defined as some norm, e.g., L2 norm, of a quantity, //! computed in mesh nodes, A, as ||A||_2 = sqrt[ sum_i(A_i)^2 V_i ], @@ -108,6 +110,8 @@ NodeDiagnostics::compute( g_cgpde[d.MeshId()].symbc( an, mv, coord, bnorm, symbcnodes ); // Apply farfield BCs on analytic solution (if exist, if not, IC) g_cgpde[d.MeshId()].farfieldbc( an, coord, bnorm, farfieldbcnodes ); + // Apply slip wall BCs on analytic solution (if exist, if not, IC) + g_cgpde[d.MeshId()].slipwallbc( an, mv, coord, bnorm, slipwallbcnodes ); // Put in norms sweeping our mesh chunk for (std::size_t i=0; i > >& bnorm, const std::unordered_set< std::size_t >& symbcnodes, - const std::unordered_set< std::size_t >& farfieldbcnodes ) const; + const std::unordered_set< std::size_t >& farfieldbcnodes, + const std::unordered_set< std::size_t >& slipwallbcnodes ) const; /** @name Charm++ pack/unpack serializer member functions */ ///@{ diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index 9c6c976654d..f4098ea463f 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -81,7 +81,9 @@ OversetFE::OversetFE( const CProxy_Discretization& disc, m_bnormc(), m_symbcnodes(), m_farfieldbcnodes(), + m_slipwallbcnodes(), m_symbctri(), + m_slipwallbctri(), m_timedepbcnodes(), m_timedepbcFn(), m_stage( 0 ), @@ -181,15 +183,37 @@ OversetFE::getBCNodes() for (const auto& [s,nodes] : far) m_farfieldbcnodes.insert( begin(nodes), end(nodes) ); - // If farfield BC is set on a node, will not also set symmetry BC - for (auto fn : m_farfieldbcnodes) m_symbcnodes.erase(fn); + // Prepare unique set of slip wall BC nodes + auto slip = d->bcnodes< tag::slipwall >( m_bface, m_triinpoel ); + for (const auto& [s,nodes] : slip) + m_slipwallbcnodes.insert( begin(nodes), end(nodes) ); - // Prepare boundary nodes contiguously accessible from a triangle-face loop + // If farfield BC is set on a node, will not also set symmetry and slip BC + for (auto fn : m_farfieldbcnodes) { + m_symbcnodes.erase(fn); + m_slipwallbcnodes.erase(fn); + } + + // If symmetry BC is set on a node, will not also set slip BC + for (auto fn : m_symbcnodes) { + m_slipwallbcnodes.erase(fn); + } + + // Prepare boundary nodes contiguously accessible from a triangle-face loop, + // which contain both symmetry and no slip walls m_symbctri.resize( m_triinpoel.size()/3, 0 ); for (std::size_t e=0; eMeshId()].farfieldbc( m_u, coord, m_bnorm, m_farfieldbcnodes ); } + // Apply slip wall BCs + g_cgpde[d->MeshId()].slipwallbc( m_u, d->MeshVel(), coord, m_bnorm, + m_slipwallbcnodes ); + // Apply user defined time dependent BCs g_cgpde[d->MeshId()].timedepbc( d->T(), m_u, m_timedepbcnodes, m_timedepbcFn ); @@ -1016,7 +1044,7 @@ OversetFE::dt() std::vector< tk::real > F(6, 0.0); if (g_inputdeck.get< tag::rigid_body_motion >().get< tag::rigid_body_movt >() && d->MeshId() > 0) { - g_cgpde[d->MeshId()].bndPressureInt( d->Coord(), m_triinpoel, m_symbctri, + g_cgpde[d->MeshId()].bndPressureInt( d->Coord(), m_triinpoel, m_slipwallbctri, m_u, m_centMass, F ); } @@ -1350,7 +1378,8 @@ OversetFE::solve() if (m_stage == 3) { // Compute diagnostics, e.g., residuals diag_computed = m_diag.compute( *d, m_u, m_un, m_bnorm, - m_symbcnodes, m_farfieldbcnodes ); + m_symbcnodes, m_farfieldbcnodes, + m_slipwallbcnodes ); // Increase number of iterations and physical time d->next(); // Advance physical time for local time stepping diff --git a/src/Inciter/OversetFE.hpp b/src/Inciter/OversetFE.hpp index 868b5dff1e6..6594d4acb34 100644 --- a/src/Inciter/OversetFE.hpp +++ b/src/Inciter/OversetFE.hpp @@ -222,7 +222,9 @@ class OversetFE : public CBase_OversetFE { p | m_bnormc; p | m_symbcnodes; p | m_farfieldbcnodes; + p | m_slipwallbcnodes; p | m_symbctri; + p | m_slipwallbctri; p | m_timedepbcnodes; p | m_timedepbcFn; p | m_stage; @@ -338,8 +340,12 @@ class OversetFE : public CBase_OversetFE { std::unordered_set< std::size_t > m_symbcnodes; //! Unique set of nodes at which farfield BCs are set std::unordered_set< std::size_t > m_farfieldbcnodes; + //! Unique set of nodes at which slip wall BCs are set + std::unordered_set< std::size_t > m_slipwallbcnodes; //! Vector with 1 at symmetry BC boundary triangles std::vector< int > m_symbctri; + //! Vector with 1 at slip wall BC boundary triangles + std::vector< int > m_slipwallbctri; //! \brief Unique set of nodes at which time dependent BCs are set // for each time dependent BC std::vector< std::unordered_set< std::size_t > > m_timedepbcnodes; From dc4d02adde3b36237eebf5bf71898745ee9c3af6 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Fri, 18 Apr 2025 09:26:00 -0600 Subject: [PATCH 13/19] naming consistency in CGCompFlow --- src/PDE/CompFlow/CGCompFlow.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index 6eb4311c3cd..419c83e8c71 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -483,14 +483,14 @@ class CompFlow { //! Compute boundary pressure integrals (force) for rigid body motion //! \param[in] coord Mesh node coordinates //! \param[in] triinpoel Boundary triangle face connecitivity with local ids - //! \param[in] symbctri Vector with 1 at symmetry BC boundary triangles + //! \param[in] slipwallbctri Vector with 1 at symmetry BC boundary triangles //! \param[in] U Solution vector at recent time step //! \param[in] CM Center of mass //! \param[in,out] F Force vector (appended with torque vector) computed void bndPressureInt( const std::array< std::vector< real >, 3 >& coord, const std::vector< std::size_t >& triinpoel, - const std::vector< int >& symbctri, + const std::vector< int >& slipwallbctri, const tk::Fields& U, const std::array< tk::real, 3 >& CM, std::vector< real >& F ) const @@ -503,7 +503,7 @@ class CompFlow { // boundary integrals: compute surface integral of pressure (=force) for (std::size_t e=0; e Date: Fri, 18 Apr 2025 09:37:12 -0600 Subject: [PATCH 14/19] revert symmetry bc --- src/Inciter/ALECG.cpp | 2 +- src/Inciter/NodeDiagnostics.cpp | 2 +- src/Inciter/OversetFE.cpp | 2 +- src/PDE/CGPDE.hpp | 7 ++----- src/PDE/CompFlow/CGCompFlow.hpp | 14 ++++++-------- src/PDE/Transport/CGTransport.hpp | 1 - 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/Inciter/ALECG.cpp b/src/Inciter/ALECG.cpp index ac426e2a945..3b9db67abe6 100644 --- a/src/Inciter/ALECG.cpp +++ b/src/Inciter/ALECG.cpp @@ -885,7 +885,7 @@ ALECG::BC() if (bc[c].first) m_u(b,c) = bc[c].second; // Apply symmetry BCs - g_cgpde[d->MeshId()].symbc( m_u, d->meshvel(), coord, m_bnorm, m_symbcnodes ); + g_cgpde[d->MeshId()].symbc( m_u, coord, m_bnorm, m_symbcnodes ); // Apply farfield BCs g_cgpde[d->MeshId()].farfieldbc( m_u, coord, m_bnorm, m_farfieldbcnodes ); diff --git a/src/Inciter/NodeDiagnostics.cpp b/src/Inciter/NodeDiagnostics.cpp index f6ad5efa62a..d473b566c9e 100644 --- a/src/Inciter/NodeDiagnostics.cpp +++ b/src/Inciter/NodeDiagnostics.cpp @@ -107,7 +107,7 @@ NodeDiagnostics::compute( for (std::size_t c=0; cMeshId()].symbc( m_u, d->MeshVel(), coord, m_bnorm, m_symbcnodes ); + g_cgpde[d->MeshId()].symbc( m_u, coord, m_bnorm, m_symbcnodes ); // Apply farfield BCs if (bci.get< tag::farfield >().empty() || (d->MeshId() == 0)) { diff --git a/src/PDE/CGPDE.hpp b/src/PDE/CGPDE.hpp index c8047d15807..f1c04bfe8b0 100644 --- a/src/PDE/CGPDE.hpp +++ b/src/PDE/CGPDE.hpp @@ -218,13 +218,12 @@ class CGPDE { //! Public interface to set symmetry boundary conditions at nodes void symbc( tk::Fields& U, - const tk::Fields& W, const std::array< std::vector< real >, 3 >& coord, const std::unordered_map< int, std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, const std::unordered_set< std::size_t >& nodes ) const - { self->symbc( U, W, coord, bnorm, nodes ); } + { self->symbc( U, coord, bnorm, nodes ); } //! Public interface to set farfield boundary conditions at nodes void @@ -397,7 +396,6 @@ class CGPDE { bool ) const = 0; virtual void symbc( tk::Fields& U, - const tk::Fields& W, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, @@ -541,13 +539,12 @@ class CGPDE { increment ); } void symbc( tk::Fields& U, - const tk::Fields& W, const std::array< std::vector< real >, 3 >& coord, const std::unordered_map< int, std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, const std::unordered_set< std::size_t >& nodes ) const override - { data.symbc( U, W, coord, bnorm, nodes ); } + { data.symbc( U, coord, bnorm, nodes ); } void farfieldbc( tk::Fields& U, const std::array< std::vector< real >, 3 >& coord, diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index 419c83e8c71..a87fbed5a56 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -750,13 +750,11 @@ class CompFlow { //! Set symmetry boundary conditions at nodes //! \param[in] U Solution vector at recent time step - //! \param[in] W Mesh velocity //! \param[in] bnorm Face normals in boundary points, key local node id, //! first 3 reals of value: unit normal, outer key: side set id //! \param[in] nodes Unique set of node ids at which to set symmetry BCs void symbc( tk::Fields& U, - const tk::Fields& W, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, std::array< real, 4 > > >& bnorm, @@ -780,12 +778,12 @@ class CompFlow { if (i != end(j->second)) { std::array< real, 3 > n{ i->second[0], i->second[1], i->second[2] }, - rel_v{ U(p,1) - W(p,0), U(p,2) - W(p,1), U(p,3) - W(p,2) }; - auto rel_v_dot_n = tk::dot( rel_v, n ); - // symbc: remove normal component of relative velocity - U(p,1) -= rel_v_dot_n * n[0]; - U(p,2) -= rel_v_dot_n * n[1]; - U(p,3) -= rel_v_dot_n * n[2]; + v{ U(p,1), U(p,2), U(p,3) }; + auto v_dot_n = tk::dot( v, n ); + // symbc: remove normal component of velocity + U(p,1) -= v_dot_n * n[0]; + U(p,2) -= v_dot_n * n[1]; + U(p,3) -= v_dot_n * n[2]; } } } diff --git a/src/PDE/Transport/CGTransport.hpp b/src/PDE/Transport/CGTransport.hpp index 7c1301aabb6..947935d8469 100644 --- a/src/PDE/Transport/CGTransport.hpp +++ b/src/PDE/Transport/CGTransport.hpp @@ -398,7 +398,6 @@ class Transport { void symbc( tk::Fields&, - const tk::Fields&, const std::array< std::vector< real >, 3 >&, const std::unordered_map< int, std::unordered_map< std::size_t, From 683fb92cfee0bddedb8085bc0da8385adb2ec354 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Fri, 18 Apr 2025 10:13:58 -0600 Subject: [PATCH 15/19] remove slipwall from list of BCs DG schemes can loop over --- src/Control/Inciter/InputDeck/InputDeck.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Control/Inciter/InputDeck/InputDeck.hpp b/src/Control/Inciter/InputDeck/InputDeck.hpp index 796f2770767..a243f6a6b8a 100644 --- a/src/Control/Inciter/InputDeck/InputDeck.hpp +++ b/src/Control/Inciter/InputDeck/InputDeck.hpp @@ -50,8 +50,7 @@ using bclist = tk::TaggedTuple< brigand::list< tag::outlet, std::vector< std::size_t >, tag::farfield, std::vector< std::size_t >, tag::extrapolate, std::vector< std::size_t >, - tag::noslipwall, std::vector< std::size_t >, - tag::slipwall, std::vector< std::size_t > + tag::noslipwall, std::vector< std::size_t > > >; // Transport From 029333b3f17becf41227543193d827a7825cb1c7 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Thu, 24 Apr 2025 14:42:15 -0600 Subject: [PATCH 16/19] added slipwalls back to bclist --- src/Control/Inciter/InputDeck/InputDeck.hpp | 3 ++- src/PDE/ConfigureCompFlow.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Control/Inciter/InputDeck/InputDeck.hpp b/src/Control/Inciter/InputDeck/InputDeck.hpp index a243f6a6b8a..796f2770767 100644 --- a/src/Control/Inciter/InputDeck/InputDeck.hpp +++ b/src/Control/Inciter/InputDeck/InputDeck.hpp @@ -50,7 +50,8 @@ using bclist = tk::TaggedTuple< brigand::list< tag::outlet, std::vector< std::size_t >, tag::farfield, std::vector< std::size_t >, tag::extrapolate, std::vector< std::size_t >, - tag::noslipwall, std::vector< std::size_t > + tag::noslipwall, std::vector< std::size_t >, + tag::slipwall, std::vector< std::size_t > > >; // Transport diff --git a/src/PDE/ConfigureCompFlow.cpp b/src/PDE/ConfigureCompFlow.cpp index 4992cb3c636..3804a681f79 100644 --- a/src/PDE/ConfigureCompFlow.cpp +++ b/src/PDE/ConfigureCompFlow.cpp @@ -142,6 +142,10 @@ infoCompFlow( std::map< ctr::PDEType, tk::ncomp_t >& cnt ) if (!sym.empty()) nfo.emplace_back( "Symmetry BC sideset(s)", parameters( sym ) ); + const auto& slip = ib.get< tag::slipwall >(); + if (!slip.empty()) + nfo.emplace_back( "Slip wall BC sideset(s)", parameters( slip ) ); + const auto& dir = ib.get< tag::dirichlet >(); if (!dir.empty()) nfo.emplace_back( "Dirichlet BC sideset(s)", parameters( dir ) ); From c50ca48f498ee0a2a5dd1f37b00d3c170d1ca11d Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Mon, 28 Apr 2025 08:48:30 -0600 Subject: [PATCH 17/19] add (invalid) slipwall BC to DG BC lists so tests pass --- src/PDE/CompFlow/DGCompFlow.hpp | 4 +++- src/PDE/MultiMat/DGMultiMat.hpp | 4 +++- src/PDE/MultiMat/FVMultiMat.hpp | 4 +++- src/PDE/MultiSpecies/DGMultiSpecies.hpp | 4 +++- src/PDE/Transport/DGTransport.hpp | 2 ++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/PDE/CompFlow/DGCompFlow.hpp b/src/PDE/CompFlow/DGCompFlow.hpp index 0c46cfe76d3..ec4fa1107f4 100644 --- a/src/PDE/CompFlow/DGCompFlow.hpp +++ b/src/PDE/CompFlow/DGCompFlow.hpp @@ -78,13 +78,15 @@ class CompFlow { , invalidBC // Outlet BC not implemented , farfield , extrapolate - , invalidBC }, // No slip wall BC not implemented + , invalidBC // No slip wall BC not implemented + , invalidBC }, // Slip wall BC not implemented // BC Gradient functions { noOpGrad , noOpGrad , noOpGrad , noOpGrad , noOpGrad + , noOpGrad , noOpGrad } ) ); diff --git a/src/PDE/MultiMat/DGMultiMat.hpp b/src/PDE/MultiMat/DGMultiMat.hpp index fececc5c0cd..da7f52ded28 100644 --- a/src/PDE/MultiMat/DGMultiMat.hpp +++ b/src/PDE/MultiMat/DGMultiMat.hpp @@ -82,13 +82,15 @@ class MultiMat { , invalidBC // Outlet BC not implemented , farfield , extrapolate - , noslipwall }, + , noslipwall + , invalidBC }, // Slip wall BC not implemented // BC Gradient functions { noOpGrad , symmetryGrad , noOpGrad , noOpGrad , noOpGrad + , noOpGrad , noOpGrad } ) ); diff --git a/src/PDE/MultiMat/FVMultiMat.hpp b/src/PDE/MultiMat/FVMultiMat.hpp index 3b18c8031ee..f36aeaaaf37 100644 --- a/src/PDE/MultiMat/FVMultiMat.hpp +++ b/src/PDE/MultiMat/FVMultiMat.hpp @@ -78,13 +78,15 @@ class MultiMat { , invalidBC // Outlet BC not implemented , farfield , extrapolate - , noslipwall }, + , noslipwall + , invalidBC }, // Slip wall BC not implemented // BC Gradient functions { noOpGrad , symmetryGrad , noOpGrad , noOpGrad , noOpGrad + , noOpGrad , noOpGrad } ) ); diff --git a/src/PDE/MultiSpecies/DGMultiSpecies.hpp b/src/PDE/MultiSpecies/DGMultiSpecies.hpp index 16fb98e6c65..3198dae03dd 100644 --- a/src/PDE/MultiSpecies/DGMultiSpecies.hpp +++ b/src/PDE/MultiSpecies/DGMultiSpecies.hpp @@ -81,13 +81,15 @@ class MultiSpecies { , invalidBC // Outlet BC not implemented , farfield , extrapolate - , noslipwall }, + , noslipwall + , invalidBC }, // Slip wall BC not implemented // BC Gradient functions { noOpGrad , symmetryGrad , noOpGrad , noOpGrad , noOpGrad + , noOpGrad , noOpGrad } ) ); diff --git a/src/PDE/Transport/DGTransport.hpp b/src/PDE/Transport/DGTransport.hpp index 4b4e0f0dfaf..6c29c9142bc 100644 --- a/src/PDE/Transport/DGTransport.hpp +++ b/src/PDE/Transport/DGTransport.hpp @@ -74,6 +74,7 @@ class Transport { , outlet , invalidBC // Characteristic BC not implemented , extrapolate + , invalidBC // Slip wall BC not implemented , invalidBC }, // No slip wall BC not implemented // BC Gradient functions { noOpGrad @@ -81,6 +82,7 @@ class Transport { , noOpGrad , noOpGrad , noOpGrad + , noOpGrad , noOpGrad } ) ); From 608b38eaea875988218794e96a30096a4444700b Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Mon, 28 Apr 2025 10:20:27 -0600 Subject: [PATCH 18/19] split out slip wall from symmetry BCs in bnd integrals, set both to be zero normal relative velocity --- src/Inciter/ALECG.cpp | 13 ++++++++++--- src/Inciter/ALECG.hpp | 3 +++ src/Inciter/OversetFE.cpp | 5 ++--- src/PDE/CGPDE.hpp | 15 +++++++++------ src/PDE/CompFlow/CGCompFlow.hpp | 22 +++++++++++++++------- src/PDE/Transport/CGTransport.hpp | 1 + 6 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/Inciter/ALECG.cpp b/src/Inciter/ALECG.cpp index 3b9db67abe6..cbd142ad48e 100644 --- a/src/Inciter/ALECG.cpp +++ b/src/Inciter/ALECG.cpp @@ -83,6 +83,7 @@ ALECG::ALECG( const CProxy_Discretization& disc, m_farfieldbcnodes(), m_slipwallbcnodes(), m_symbctri(), + m_slipwallbctri(), m_timedepbcnodes(), m_timedepbcFn(), m_stage( 0 ), @@ -194,10 +195,16 @@ ALECG::queryBnd() // which contain both symmetry and no slip walls m_symbctri.resize( m_triinpoel.size()/3, 0 ); for (std::size_t e=0; eVol() ); g_cgpde[d->MeshId()].rhs( d->T() + prev_rkcoef * d->Dt(), d->Coord(), d->Inpoel(), m_triinpoel, d->Gid(), d->Bid(), d->Lid(), m_dfn, m_psup, m_esup, - m_symbctri, d->Vol(), m_edgenode, m_edgeid, + m_symbctri, m_slipwallbctri, d->Vol(), m_edgenode, m_edgeid, m_boxnodes, m_chBndGrad, m_u, d->meshvel(), m_tp, d->Boxvol(), m_rhs ); volumetric( m_u, Disc()->Vol() ); diff --git a/src/Inciter/ALECG.hpp b/src/Inciter/ALECG.hpp index 2160c178880..a556b35e98f 100644 --- a/src/Inciter/ALECG.hpp +++ b/src/Inciter/ALECG.hpp @@ -236,6 +236,7 @@ class ALECG : public CBase_ALECG { p | m_farfieldbcnodes; p | m_slipwallbcnodes; p | m_symbctri; + p | m_slipwallbctri; p | m_timedepbcnodes; p | m_timedepbcFn; p | m_stage; @@ -339,6 +340,8 @@ class ALECG : public CBase_ALECG { std::unordered_set< std::size_t > m_slipwallbcnodes; //! Vector with 1 at symmetry BC boundary triangles std::vector< int > m_symbctri; + //! Vector with 1 at slip wall BC boundary triangles + std::vector< int > m_slipwallbctri; //! \brief Unique set of nodes at which time dependent BCs are set // for each time dependent BC std::vector< std::unordered_set< std::size_t > > m_timedepbcnodes; diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index 54c72fa3993..848776160b9 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -203,8 +203,7 @@ OversetFE::getBCNodes() // which contain both symmetry and no slip walls m_symbctri.resize( m_triinpoel.size()/3, 0 ); for (std::size_t e=0; eMeshId()].rhs( d->T() + prev_rkcoef * d->Dt(), d->Coord(), d->Inpoel(), m_triinpoel, d->Gid(), d->Bid(), d->Lid(), m_dfn, m_psup, m_esup, - m_symbctri, d->Vol(), m_edgenode, m_edgeid, + m_symbctri, m_slipwallbctri, d->Vol(), m_edgenode, m_edgeid, m_boxnodes, m_chBndGrad, m_u, d->MeshVel(), m_tp, d->Boxvol(), m_rhs ); if (steady) diff --git a/src/PDE/CGPDE.hpp b/src/PDE/CGPDE.hpp index f1c04bfe8b0..24c18fdfcc3 100644 --- a/src/PDE/CGPDE.hpp +++ b/src/PDE/CGPDE.hpp @@ -162,6 +162,7 @@ class CGPDE { const std::pair< std::vector< std::size_t >, std::vector< std::size_t > >& esup, const std::vector< int >& symbctri, + const std::vector< int >& slipwallbctri, const std::vector< real >& vol, const std::vector< std::size_t >& edgenode, const std::vector< std::size_t >& edgeid, @@ -173,18 +174,18 @@ class CGPDE { real V, tk::Fields& R ) const { self->rhs( t, coord, inpoel, triinpoel, gid, bid, lid, dfn, psup, - esup, symbctri, vol, edgenode, edgeid, + esup, symbctri, slipwallbctri, vol, edgenode, edgeid, boxnodes, G, U, W, tp, V, R ); } //! Public interface to compute boundary surface integrals of pressure void bndPressureInt( const std::array< std::vector< real >, 3 >& coord, const std::vector< std::size_t >& triinpoel, - const std::vector< int >& symbctri, + const std::vector< int >& slipwallbctri, const tk::Fields& U, const std::array< tk::real, 3 >& CM, std::vector< real >& F ) const - { self->bndPressureInt( coord, triinpoel, symbctri, U, CM, F ); } + { self->bndPressureInt( coord, triinpoel, slipwallbctri, U, CM, F ); } //! Public interface for computing the minimum time step size real dt( const std::array< std::vector< real >, 3 >& coord, @@ -358,6 +359,7 @@ class CGPDE { const std::pair< std::vector< std::size_t >, std::vector< std::size_t > >&, const std::vector< int >&, + const std::vector< int >&, const std::vector< real >&, const std::vector< std::size_t >&, const std::vector< std::size_t >&, @@ -493,6 +495,7 @@ class CGPDE { const std::pair< std::vector< std::size_t >, std::vector< std::size_t > >& esup, const std::vector< int >& symbctri, + const std::vector< int >& slipwallbctri, const std::vector< real >& vol, const std::vector< std::size_t >& edgenode, const std::vector< std::size_t >& edgeid, @@ -504,16 +507,16 @@ class CGPDE { real V, tk::Fields& R ) const override { data.rhs( t, coord, inpoel, triinpoel, gid, bid, lid, dfn, psup, - esup, symbctri, vol, edgenode, + esup, symbctri, slipwallbctri, vol, edgenode, edgeid, boxnodes, G, U, W, tp, V, R ); } void bndPressureInt( const std::array< std::vector< real >, 3 >& coord, const std::vector< std::size_t >& triinpoel, - const std::vector< int >& symbctri, + const std::vector< int >& slipwallbctri, const tk::Fields& U, const std::array< tk::real, 3 >& CM, std::vector< real >& F ) const override - { data.bndPressureInt( coord, triinpoel, symbctri, U, CM, F ); } + { data.bndPressureInt( coord, triinpoel, slipwallbctri, U, CM, F ); } real dt( const std::array< std::vector< real >, 3 >& coord, const std::vector< std::size_t >& inpoel, tk::real t, diff --git a/src/PDE/CompFlow/CGCompFlow.hpp b/src/PDE/CompFlow/CGCompFlow.hpp index a87fbed5a56..2fac287b564 100644 --- a/src/PDE/CompFlow/CGCompFlow.hpp +++ b/src/PDE/CompFlow/CGCompFlow.hpp @@ -402,6 +402,7 @@ class CompFlow { //! \param[in] psup Points surrounding points //! \param[in] esup Elements surrounding points //! \param[in] symbctri Vector with 1 at symmetry BC boundary triangles + //! \param[in] slipwallbctri Vector with 1 at slip BC boundary triangles //! \param[in] vol Nodal volumes //! \param[in] edgenode Local node IDs of edges //! \param[in] edgeid Edge ids in the order of access @@ -425,6 +426,7 @@ class CompFlow { const std::pair< std::vector< std::size_t >, std::vector< std::size_t > >& esup, const std::vector< int >& symbctri, + const std::vector< int >& slipwallbctri, const std::vector< real >& vol, const std::vector< std::size_t >& edgenode, const std::vector< std::size_t >& edgeid, @@ -455,7 +457,7 @@ class CompFlow { domainint( coord, gid, edgenode, edgeid, psup, dfn, U, W, Grad, R ); // compute boundary integrals - bndint( coord, triinpoel, symbctri, U, W, R ); + bndint( coord, triinpoel, symbctri, slipwallbctri, U, W, R ); // compute external (energy) sources const auto& icbox = g_inputdeck.get< tag::ic, tag::box >(); @@ -1311,12 +1313,14 @@ class CompFlow { //! \param[in] coord Mesh node coordinates //! \param[in] triinpoel Boundary triangle face connecitivity with local ids //! \param[in] symbctri Vector with 1 at symmetry BC boundary triangles + //! \param[in] slipwallbctri Vector with 1 at slip wall BC boundary triangles //! \param[in] U Solution vector at recent time step //! \param[in] W Mesh velocity //! \param[in,out] R Right-hand side vector computed void bndint( const std::array< std::vector< real >, 3 >& coord, const std::vector< std::size_t >& triinpoel, const std::vector< int >& symbctri, + const std::vector< int >& slipwallbctri, const tk::Fields& U, const tk::Fields& W, tk::Fields& R ) const @@ -1370,30 +1374,34 @@ class CompFlow { real f[m_ncomp][3]; real p, vn; int sym = symbctri[e]; + int slip = slipwallbctri[e]; p = m_mat_blk[0].compute< EOS::pressure >( rA, ruA/rA, rvA/rA, rwA/rA, reA ); - vn = sym ? 0.0 : (nx*(ruA/rA-w1A) + ny*(rvA/rA-w2A) + nz*(rwA/rA-w3A)); + vn = (sym || slip) ? 0.0 : (nx*(ruA/rA-w1A) + ny*(rvA/rA-w2A) + nz*(rwA/rA-w3A)); f[0][0] = rA*vn; f[1][0] = ruA*vn + p*nx; f[2][0] = rvA*vn + p*ny; f[3][0] = rwA*vn + p*nz; - f[4][0] = reA*vn + p*(sym ? 0.0 : (nx*ruA + ny*rvA + nz*rwA)/rA); + f[4][0] = reA*vn + p*((sym || slip) + ? 0.0 : (nx*ruA + ny*rvA + nz*rwA)/rA); p = m_mat_blk[0].compute< EOS::pressure >( rB, ruB/rB, rvB/rB, rwB/rB, reB ); - vn = sym ? 0.0 : (nx*(ruB/rB-w1B) + ny*(rvB/rB-w2B) + nz*(rwB/rB-w3B)); + vn = (sym || slip) ? 0.0 : (nx*(ruB/rB-w1B) + ny*(rvB/rB-w2B) + nz*(rwB/rB-w3B)); f[0][1] = rB*vn; f[1][1] = ruB*vn + p*nx; f[2][1] = rvB*vn + p*ny; f[3][1] = rwB*vn + p*nz; - f[4][1] = reB*vn + p*(sym ? 0.0 : (nx*ruB + ny*rvB + nz*rwB)/rB); + f[4][1] = reB*vn + p*((sym || slip) + ? 0.0 : (nx*ruB + ny*rvB + nz*rwB)/rB); p = m_mat_blk[0].compute< EOS::pressure >( rC, ruC/rC, rvC/rC, rwC/rC, reC ); - vn = sym ? 0.0 : (nx*(ruC/rC-w1C) + ny*(rvC/rC-w2C) + nz*(rwC/rC-w3C)); + vn = (sym || slip) ? 0.0 : (nx*(ruC/rC-w1C) + ny*(rvC/rC-w2C) + nz*(rwC/rC-w3C)); f[0][2] = rC*vn; f[1][2] = ruC*vn + p*nx; f[2][2] = rvC*vn + p*ny; f[3][2] = rwC*vn + p*nz; - f[4][2] = reC*vn + p*(sym ? 0.0 : (nx*ruC + ny*rvC + nz*rwC)/rC); + f[4][2] = reC*vn + p*((sym || slip) + ? 0.0 : (nx*ruC + ny*rvC + nz*rwC)/rC); // compute face area auto A6 = tk::area( x[N[0]], x[N[1]], x[N[2]], y[N[0]], y[N[1]], y[N[2]], diff --git a/src/PDE/Transport/CGTransport.hpp b/src/PDE/Transport/CGTransport.hpp index 947935d8469..62d5b7f932f 100644 --- a/src/PDE/Transport/CGTransport.hpp +++ b/src/PDE/Transport/CGTransport.hpp @@ -227,6 +227,7 @@ class Transport { const std::pair< std::vector< std::size_t >, std::vector< std::size_t > >& esup, const std::vector< int >& symbctri, + const std::vector< int >&, const std::vector< real >& vol, const std::vector< std::size_t >&, const std::vector< std::size_t >& edgeid, From 080c96b0e41aac057cf5770c3ff46cf84cf843c5 Mon Sep 17 00:00:00 2001 From: g-rydquist Date: Mon, 28 Apr 2025 13:13:53 -0600 Subject: [PATCH 19/19] changes per review --- src/Inciter/OversetFE.cpp | 6 +++--- src/PDE/CompFlow/DGCompFlow.hpp | 2 +- src/PDE/MultiMat/DGMultiMat.hpp | 4 ++-- src/PDE/MultiMat/FVMultiMat.hpp | 4 ++-- src/PDE/MultiSpecies/DGMultiSpecies.hpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Inciter/OversetFE.cpp b/src/Inciter/OversetFE.cpp index 848776160b9..b0ebfb4788d 100644 --- a/src/Inciter/OversetFE.cpp +++ b/src/Inciter/OversetFE.cpp @@ -1300,9 +1300,9 @@ OversetFE::solve() // rotation (this is currently only configured for planar motion) // --------------------------------------------------------------------- std::array< tk::real, 3 > rCM{{ - d->Coord()[0][p] - m_centMassn[0], - d->Coord()[1][p] - m_centMassn[1], - d->Coord()[2][p] - m_centMassn[2] }}; + d->Coordn()[0][p] - m_centMassn[0], + d->Coordn()[1][p] - m_centMassn[1], + d->Coordn()[2][p] - m_centMassn[2] }}; // obtain tangential velocity tk::real r_mag(0.0); diff --git a/src/PDE/CompFlow/DGCompFlow.hpp b/src/PDE/CompFlow/DGCompFlow.hpp index ec4fa1107f4..388a1435049 100644 --- a/src/PDE/CompFlow/DGCompFlow.hpp +++ b/src/PDE/CompFlow/DGCompFlow.hpp @@ -79,7 +79,7 @@ class CompFlow { , farfield , extrapolate , invalidBC // No slip wall BC not implemented - , invalidBC }, // Slip wall BC not implemented + , symmetry }, // Slip equivalent to symmetry without mesh motion // BC Gradient functions { noOpGrad , noOpGrad diff --git a/src/PDE/MultiMat/DGMultiMat.hpp b/src/PDE/MultiMat/DGMultiMat.hpp index da7f52ded28..d1a08d61fd1 100644 --- a/src/PDE/MultiMat/DGMultiMat.hpp +++ b/src/PDE/MultiMat/DGMultiMat.hpp @@ -83,7 +83,7 @@ class MultiMat { , farfield , extrapolate , noslipwall - , invalidBC }, // Slip wall BC not implemented + , symmetry }, // Slip equivalent to symmetry without mesh motion // BC Gradient functions { noOpGrad , symmetryGrad @@ -91,7 +91,7 @@ class MultiMat { , noOpGrad , noOpGrad , noOpGrad - , noOpGrad } + , symmetryGrad } ) ); // Inlet BC has a different structure than above BCs, so it must be diff --git a/src/PDE/MultiMat/FVMultiMat.hpp b/src/PDE/MultiMat/FVMultiMat.hpp index f36aeaaaf37..c974bc24372 100644 --- a/src/PDE/MultiMat/FVMultiMat.hpp +++ b/src/PDE/MultiMat/FVMultiMat.hpp @@ -79,7 +79,7 @@ class MultiMat { , farfield , extrapolate , noslipwall - , invalidBC }, // Slip wall BC not implemented + , symmetry }, // Slip equivalent to symmetry without mesh motion // BC Gradient functions { noOpGrad , symmetryGrad @@ -87,7 +87,7 @@ class MultiMat { , noOpGrad , noOpGrad , noOpGrad - , noOpGrad } + , symmetryGrad } ) ); // Inlet BC has a different structure than above BCs, so it must be diff --git a/src/PDE/MultiSpecies/DGMultiSpecies.hpp b/src/PDE/MultiSpecies/DGMultiSpecies.hpp index 3198dae03dd..7d68d4d7ebf 100644 --- a/src/PDE/MultiSpecies/DGMultiSpecies.hpp +++ b/src/PDE/MultiSpecies/DGMultiSpecies.hpp @@ -82,7 +82,7 @@ class MultiSpecies { , farfield , extrapolate , noslipwall - , invalidBC }, // Slip wall BC not implemented + , symmetry }, // Slip equivalent to symmetry without mesh motion // BC Gradient functions { noOpGrad , symmetryGrad @@ -90,7 +90,7 @@ class MultiSpecies { , noOpGrad , noOpGrad , noOpGrad - , noOpGrad } + , symmetryGrad } ) ); // EoS initialization