Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Velocity transfer at fluid-structure interface #1174

Merged
merged 47 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c8dc49c
set up solver header functions
cvencro Jan 18, 2021
554c8ad
set up variable header functions for velocity transfer
cvencro Jan 18, 2021
c6f2c8a
modify displacement interface size for time domain
cvencro Jan 18, 2021
6a1f958
update interface to handle velocity for dynamic simulations
cvencro Jan 18, 2021
317cac8
create velocity bc and set up predicted velocity
cvencro Jan 18, 2021
35cd5b9
add predicted velocity for mpi comms
cvencro Jan 18, 2021
15afa21
propagate grid velocity from FSI boundary
cvencro Jan 18, 2021
a84aafb
add new variables needed for velocity transfer
cvencro Jan 18, 2021
be06603
add call to set predicted velocity
cvencro Jan 18, 2021
56402a9
add enum for predicted velocity in MPI quantities
cvencro Jan 18, 2021
c59ee93
update structural velocity solution before transferring data at inter…
cvencro Jan 18, 2021
6a65854
add velocity and acceleration solutions to default output for dynamic…
cvencro Jan 18, 2021
93b9400
fix to include grid velocity output for dynamic grid problems
cvencro Jan 18, 2021
57ccd71
fix to use freestream ref velocity in forces calc for dynamic FSI
cvencro Jan 18, 2021
46079d7
Merge branch 'develop' into feature_velocity_bc_fsi
cvencro Jan 18, 2021
f9e5c39
Merge branch 'develop' into feature_velocity_bc_fsi
cvencro Jan 22, 2021
4e28c27
switch to nPoint
cvencro Jan 24, 2021
1f5d919
remove separate function to set boundary velocities
cvencro Jan 24, 2021
46c6fb9
update dynamic fsi reg test values
cvencro Jan 24, 2021
4ff9263
Merge branch 'develop' into feature_velocity_bc_fsi
pcarruscag Jan 30, 2021
09e0a4a
Merge branch 'develop' into feature_velocity_bc_fsi
pcarruscag Feb 6, 2021
06370be
Merge branch 'develop' into feature_velocity_bc_fsi
pcarruscag Feb 13, 2021
090e760
Merge branch 'develop' into feature_velocity_bc_fsi
pcarruscag Feb 22, 2021
d2bb020
Merge branch 'develop' into feature_velocity_bc_fsi after fixing mino…
cvencro Mar 28, 2021
4503935
Merge branch 'develop' into feature_velocity_bc_fsi after fixing mino…
cvencro Apr 14, 2021
0b8a1e7
clear solution too in DeformMesh
cvencro Apr 14, 2021
b53fbcd
use vel
cvencro Apr 14, 2021
90aaf77
add missing end macro
cvencro Apr 14, 2021
f6c7142
add another missing end macro
cvencro Apr 14, 2021
4b85daf
Merge branch 'fix_tavg_output' into feature_velocity_bc_fsi
cvencro Apr 17, 2021
cbeba36
remove structural specific calls
cvencro Apr 18, 2021
4954e5b
clean up with velocity booleans
cvencro Apr 18, 2021
95c3ba3
Merge branch 'develop' into feature_velocity_bc_fsi
pcarruscag Apr 18, 2021
d77d0c0
add time domain fsi logic for LinSysSol and loop over nPoint
cvencro Apr 18, 2021
eb22e7a
revert to original Update call
cvencro Apr 18, 2021
f005c06
remove unused SOLUTION_VEL_PRED
cvencro Apr 18, 2021
4be8745
Merge branch 'feature_velocity_bc_fsi' of https://github.com/su2code/…
cvencro Apr 18, 2021
112ffc1
fix nested parallel problem, some cleanup of BC functions
pcarruscag Apr 18, 2021
454f628
remove unused statements
cvencro Apr 19, 2021
982e9e2
remove the attached variables that are also no longer necessary
cvencro Apr 19, 2021
d2ff3ef
Revert "remove the attached variables that are also no longer necessary"
cvencro Apr 19, 2021
2b44fae
Revert "remove unused statements"
cvencro Apr 19, 2021
3ed441c
update dynamic fsi reg tests
cvencro Apr 19, 2021
2b4509c
cannot remove grid coord MPI, error message for MARKER_FLUID_LOAD in …
pcarruscag Apr 19, 2021
853bab2
Merge branch 'feature_velocity_bc_fsi' of https://github.com/su2code/…
pcarruscag Apr 19, 2021
031823c
set pred vel together with pred disp, consistent with relaxation
pcarruscag Apr 19, 2021
22b23dd
Merge branch 'develop' into feature_velocity_bc_fsi
cvencro Apr 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,6 @@ enum MPI_QUANTITIES {
MESH_DISPLACEMENTS , /*!< \brief Mesh displacements at the interface. */
SOLUTION_TIME_N , /*!< \brief Solution at time n. */
SOLUTION_TIME_N1 , /*!< \brief Solution at time n-1. */
PRIMITIVE /*!< \brief Primitive solution communication. */
};

/*!
Expand Down
33 changes: 3 additions & 30 deletions SU2_CFD/include/solvers/CFEASolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,48 +361,40 @@ class CFEASolver : public CSolver {
/*!
* \brief Clamped boundary conditions.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Clamped(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

/*!
* \brief Enforce the solution to be 0 in the clamped nodes - Avoids accumulation of numerical error.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Clamped_Post(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

/*!
* \brief Symmetry boundary conditions.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Sym_Plane(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_DispDir(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

Expand All @@ -414,58 +406,39 @@ class CFEASolver : public CSolver {
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Normal_Load(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

/*!
* \brief Impose a load boundary condition in cartesian coordinates.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Dir_Load(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

/*!
* \brief Impose a sine-wave load boundary condition in cartesian coordinates.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline void BC_Sine_Load(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final { }

/*!
* \brief Impose a damping load.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Damper(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

/*!
* \brief Deformable boundary condition.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Deforming(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) final;

/*!
* \brief Iterate using an implicit Newmark solver.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down Expand Up @@ -681,7 +654,7 @@ class CFEASolver : public CSolver {
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Configuration of the problem.
*/
void PredictStruct_Displacement(CGeometry *geometry, CConfig *config) final;
void PredictStruct_Displacement(CGeometry *geometry, const CConfig *config) final;

/*!
* \brief Computation of Aitken's coefficient.
Expand All @@ -690,15 +663,15 @@ class CFEASolver : public CSolver {
* \param[in] iOuterIter - Current outer iteration.
*/
void ComputeAitken_Coefficient(CGeometry *geometry,
CConfig *config,
const CConfig *config,
unsigned long iOuterIter) final;

/*!
* \brief Aitken's relaxation of the solution.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
*/
void SetAitken_Relaxation(CGeometry *geometry, CConfig *config) final;
void SetAitken_Relaxation(CGeometry *geometry, const CConfig *config) final;

/*!
* \brief Compute the penalty due to the stiffness increase
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ void CFVMFlowSolverBase<V, FlowRegime>::Pressure_Forces(const CGeometry* geometr

RefTemp = Temperature_Inf;
RefDensity = Density_Inf;
if (dynamic_grid) {
if (dynamic_grid && !config->GetFSI_Simulation()) {
Mach2Vel = sqrt(Gamma * Gas_Constant * RefTemp);
Mach_Motion = config->GetMach_Motion();
RefVel2 = (Mach_Motion * Mach2Vel) * (Mach_Motion * Mach2Vel);
Expand Down
20 changes: 19 additions & 1 deletion SU2_CFD/include/solvers/CMeshSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ class CMeshSolver final : public CFEASolver {
*/
void ComputeGridVelocity(CGeometry *geometry, CConfig *config);

/*!
* \brief Compute the grid velocity form the velocity at deformable boundary.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
*/
void ComputeGridVelocity_FromBoundary(CGeometry **geometry, CNumerics **numerics, CConfig *config);

/*!
* \brief Update the coarse multigrid levels after the grid movement.
* \param[in] geometry - Geometrical definition of the problem.
Expand All @@ -99,8 +107,18 @@ class CMeshSolver final : public CFEASolver {
* \brief Check the boundary vertex that are going to be moved.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] velocity_transfer - Boolean for deforming displacement or velocity
*/
void SetBoundaryDisplacements(CGeometry *geometry, CConfig *config, bool velocity_transfer);

/*!
* \brief Apply forced displacement boundary conditions.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Index of the marker.
* \param[in] velocity - Boolean for deforming displacement or velocity.
*/
void SetBoundaryDisplacements(CGeometry *geometry, CNumerics *numerics, CConfig *config);
void BC_Deforming(CGeometry *geometry, const CConfig *config, unsigned short val_marker, bool velocity);

public:
/*!
Expand Down
34 changes: 3 additions & 31 deletions SU2_CFD/include/solvers/CSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,48 +817,40 @@ class CSolver {
/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_Clamped(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_Clamped_Post(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_Sym_Plane(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_DispDir(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

Expand All @@ -877,64 +869,44 @@ class CSolver {
/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_Normal_Load(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_Dir_Load(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] solver - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/

inline virtual void BC_Sine_Load(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_Damper(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline virtual void BC_Deforming(CGeometry *geometry,
CNumerics *numerics,
const CConfig *config,
unsigned short val_marker) { }

/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down Expand Up @@ -3440,7 +3412,7 @@ class CSolver {
* \param[in] config - Definition of the problem.
*/
inline virtual void PredictStruct_Displacement(CGeometry *geometry,
CConfig *config) { }
const CConfig *config) { }

/*!
* \brief A virtual member.
Expand All @@ -3449,7 +3421,7 @@ class CSolver {
* \param[in] iOuterIter - Current outer iteration.
*/
inline virtual void ComputeAitken_Coefficient(CGeometry *geometry,
CConfig *config,
const CConfig *config,
unsigned long iOuterIter) { }

/*!
Expand All @@ -3458,7 +3430,7 @@ class CSolver {
* \param[in] config - Definition of the particular problem.
*/
inline virtual void SetAitken_Relaxation(CGeometry *geometry,
CConfig *config) { }
const CConfig *config) { }

/*!
* \brief Loads the solution from the restart file.
Expand Down
14 changes: 14 additions & 0 deletions SU2_CFD/include/variables/CFEAVariable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class CFEAVariable : public CVariable {

MatrixType Solution_Pred; /*!< \brief Predictor of the solution for FSI purposes */
MatrixType Solution_Pred_Old; /*!< \brief Predictor of the solution at time n for FSI purposes */
MatrixType Solution_Vel_Pred; /*!< \brief Predictor of the velocity solution for FSI purposes */

MatrixType Reference_Geometry; /*!< \brief Reference solution for optimization problems */

Expand Down Expand Up @@ -251,6 +252,13 @@ class CFEAVariable : public CVariable {
*/
inline su2double *GetSolution_Accel_time_n(unsigned long iPoint) final { return Solution_Accel_time_n[iPoint]; }

/*!
* \brief Set the value of the solution velocity predictor.
*/
inline void SetSolution_Vel_Pred(unsigned long iPoint) final {
for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Vel_Pred(iPoint,iVar) = Solution_Vel(iPoint,iVar);
}

/*!
* \brief Set the value of the old solution.
* \param[in] val_solution_pred - Pointer to the residual vector.
Expand All @@ -259,6 +267,12 @@ class CFEAVariable : public CVariable {
for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_Pred(iPoint,iVar) = val_solution_pred[iVar];
}

/*!
* \brief Get the velocity solution.
* \return Pointer to velocity solution vector.
*/
inline const su2double *GetSolution_Vel_Pred(unsigned long iPoint) const final { return Solution_Vel_Pred[iPoint]; }

/*!
* \brief Get the solution at time n.
* \return Pointer to the solution (at time n) vector.
Expand Down
Loading