Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d657e3f
Initial implementation of incompressible ALE
cvencro Sep 26, 2018
6a15d71
Add FSI bug fixes
cvencro Sep 30, 2018
13ff5ed
Merge with develop and resolved conflicts
cvencro Dec 20, 2018
039ce34
fix duplicated line
cvencro Dec 21, 2018
f4c4d48
Merge with develop
cvencro Feb 15, 2019
c907272
Tidy temporary FSI fixes
cvencro Feb 15, 2019
987e58a
Merge branch 'develop' into feature_incompressible_ale
cvencro Feb 27, 2019
6f46955
Corrected density term names
cvencro Feb 27, 2019
74666b9
Temporarily ignore GCL
cvencro Mar 13, 2019
79bdbad
Merge branch 'develop' into feature_incompressible_ale
cvencro Mar 13, 2019
bcf715c
Reverting temporary comments
cvencro Mar 20, 2019
8eb7d1d
Preconditioning terms added to the Jacobian contribution due to the d…
cvencro Mar 20, 2019
6ebdbff
Merge remote branch 'origin/develop' into feature_incompressible_ale
TobiKattmann Mar 22, 2019
500df9b
Merge branch 'develop' into feature_incompressible_ale
cvencro Mar 25, 2019
914a90b
Only commented changes. Disturbed Initialzation. Reflected state Eule…
TobiKattmann Mar 25, 2019
7470687
Merge remote branch 'origin/feature_incompressible_ale' into feature_…
TobiKattmann Mar 25, 2019
4e68c6e
Primitive additions to the Jacobian in convective schemes for grid mo…
cvencro Mar 26, 2019
f8e6bdf
Merge remote branch 'origin/feature_incompressible_ale' into feature_…
TobiKattmann Mar 26, 2019
f81ee4b
Merge with develop and fix conflicts
cvencro May 15, 2019
276a710
Enable unsteady adjoint with dynamic mesh movement
cvencro May 20, 2019
e6ea7eb
Fixed adjoint with grid movement such that correct Coords and GridVel…
TobiKattmann May 20, 2019
708f1a2
Merge remote-tracking branch 'origin/feature_incompressible_ale' into…
TobiKattmann May 20, 2019
6a678f3
Fixing failing Regression test by reverting Restart_OldGeometry to
TobiKattmann May 21, 2019
8e1c3be
FDS Preaccumulation with GridVels.
TobiKattmann Jun 7, 2019
2dcb696
Merge remote-tracking branch 'origin' into feature_incompressible_ale
TobiKattmann Jun 7, 2019
7f183ad
Merge remote-tracking branch 'origin/develop' into feature_incompress…
TobiKattmann Jun 11, 2019
2a06e45
Merge with develop and fix minor conflicts
cvencro Aug 7, 2019
97577f0
Fix config and rotation rate function names
cvencro Aug 7, 2019
ef6c3da
Merge branch 'develop' into feature_incompressible_ale
cvencro Aug 21, 2019
8c9c681
tidy comments
cvencro Aug 21, 2019
4c4f163
revert travis.yml
cvencro Aug 21, 2019
c12d70b
revert changes for dynamic discrete adjoint to prepare for PR
cvencro Aug 21, 2019
02592d4
Reverted all excecutable file permissions for cpp/hpp/inl files.
TobiKattmann Aug 22, 2019
e5d456e
Little cleaning of CSourceIncRotatingFrame_Flow.
TobiKattmann Aug 22, 2019
2cabc26
Remove trailing whitespaces from CSourceIncRotatingFrame_Flow class d…
TobiKattmann Aug 22, 2019
4129bac
Added new incompressible ale pitching airfoil case
cvencro Aug 30, 2019
6a9c87d
Updated grid velocity correction comments
cvencro Aug 30, 2019
3781d7c
Call SetPreconditioner for Jacobian matrix for static and dynamic pro…
cvencro Aug 30, 2019
ad936f6
Merge branch 'develop' into feature_incompressible_ale and fix conflicts
cvencro Aug 30, 2019
e3951df
Updated to new dynamic grid boolean and added preaccumulation
cvencro Aug 30, 2019
4051b40
Updated SOLVER definition in test case
cvencro Aug 30, 2019
16f6ee9
revert preaccumulation to pass JST regression tests
cvencro Aug 30, 2019
395275c
Merge remote-tracking branch 'origin/develop' into feature_incompress…
TobiKattmann Sep 2, 2019
5a14750
Merge remote-tracking branch 'origin/develop' into feature_incompress…
TobiKattmann Sep 2, 2019
92b58d7
PR767: Added serial and parallel regression test.
TobiKattmann Sep 3, 2019
fa587e2
Revert .travis.yml to develop.
TobiKattmann Sep 3, 2019
a91c843
Error catch for rotating frame in incompressible solver
cvencro Sep 3, 2019
f022a88
Merge remote-tracking branch 'origin/develop' into feature_incompress…
TobiKattmann Sep 4, 2019
6d83e12
Merge remote-tracking branch 'origin/feature_incompressible_ale' into…
TobiKattmann Sep 4, 2019
a7d10a1
Remove Unused Variable which throws compiler warning.
TobiKattmann Sep 4, 2019
a7d9b01
Merge branch 'develop' into feature_incompressible_ale
economon Sep 4, 2019
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
6 changes: 3 additions & 3 deletions Common/src/config_structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4299,10 +4299,10 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
}
}

/*--- Grid motion is not yet supported with the incompressible solver. ---*/
/*--- Rotating frame is not yet supported with the incompressible solver. ---*/

if ((Kind_Solver == INC_EULER || Kind_Solver == INC_NAVIER_STOKES || Kind_Solver == INC_RANS) && (GetGrid_Movement())) {
SU2_MPI::Error("Support for grid movement not yet implemented for incompressible flows.", CURRENT_FUNCTION);
if ((Kind_Solver == INC_EULER || Kind_Solver == INC_NAVIER_STOKES || Kind_Solver == INC_RANS) && (Kind_GridMovement == ROTATING_FRAME)) {
SU2_MPI::Error("Support for rotating frame simulation not yet implemented for incompressible flows.", CURRENT_FUNCTION);
}

/*--- Assert that there are two markers being analyzed if the
Expand Down
36 changes: 36 additions & 0 deletions SU2_CFD/include/numerics_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5263,6 +5263,42 @@ class CSourceIncBodyForce : public CNumerics {

};

/*!
* \class CSourceIncRotatingFrame_Flow
* \brief Class for a rotating frame source term.
* \ingroup SourceDiscr
*/
class CSourceIncRotatingFrame_Flow : public CNumerics {

private:
su2double Omega[3]; /*!< \brief Angular velocity */
bool implicit; /*!< \brief Implicit calculation. */

public:

/*!
* \brief Constructor of the class.
* \param[in] val_nDim - Number of dimensions of the problem.
* \param[in] val_nVar - Number of variables of the problem.
* \param[in] config - Definition of the particular problem.
*/
CSourceIncRotatingFrame_Flow(unsigned short val_nDim, unsigned short val_nVar, CConfig *config);

/*!
* \brief Destructor of the class.
*/
~CSourceIncRotatingFrame_Flow(void);

/*!
* \brief Residual of the rotational frame source term.
* \param[out] val_residual - Pointer to the total residual.
* \param[out] val_Jacobian_i - Jacobian of the numerical method at node i (implicit computation).
* \param[in] config - Definition of the particular problem.
*/
void ComputeResidual(su2double *val_residual, su2double **val_Jacobian_i, CConfig *config);

};

/*!
* \class CSourceBoussinesq
* \brief Class for the source term integration of the Boussinesq approximation for incompressible flow.
Expand Down
1 change: 1 addition & 0 deletions SU2_CFD/include/solver_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ class CSolver {
/*!
* \brief Load the geometries at the previous time states n and nM1.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
*/
virtual void Restart_OldGeometry(CGeometry *geometry, CConfig *config);

Expand Down
5 changes: 3 additions & 2 deletions SU2_CFD/src/drivers/CDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,8 @@ void CDriver::Numerics_Preprocessing(CConfig *config, CGeometry **geometry, CSol
else if (incompressible && (config->GetKind_DensityModel() == BOUSSINESQ))
numerics[iMGlevel][FLOW_SOL][SOURCE_FIRST_TERM] = new CSourceBoussinesq(nDim, nVar_Flow, config);
else if (config->GetRotating_Frame() == YES)
numerics[iMGlevel][FLOW_SOL][SOURCE_FIRST_TERM] = new CSourceRotatingFrame_Flow(nDim, nVar_Flow, config);
if (incompressible) numerics[iMGlevel][FLOW_SOL][SOURCE_FIRST_TERM] = new CSourceIncRotatingFrame_Flow(nDim, nVar_Flow, config);
else numerics[iMGlevel][FLOW_SOL][SOURCE_FIRST_TERM] = new CSourceRotatingFrame_Flow(nDim, nVar_Flow, config);
else if (config->GetAxisymmetric() == YES)
if (incompressible) numerics[iMGlevel][FLOW_SOL][SOURCE_FIRST_TERM] = new CSourceIncAxisymmetric_Flow(nDim, nVar_Flow, config);
else numerics[iMGlevel][FLOW_SOL][SOURCE_FIRST_TERM] = new CSourceAxisymmetric_Flow(nDim, nVar_Flow, config);
Expand Down Expand Up @@ -3831,7 +3832,7 @@ void CDriver::StartSolver(){

/*--- Perform a dynamic mesh update if required. ---*/

if (!fem_solver) {
if (!fem_solver && !(config_container[ZONE_0]->GetGrid_Movement() && config_container[ZONE_0]->GetDiscrete_Adjoint())) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The StartSolver() in CDriver should be deprecated soon. Has this feature also been tested with the single-zone driver, using SINGLEZONE_DRIVER = YES? This should become the default once #724 is merged.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now tested this with SINGLEZONE_DRIVER = YES and NO, the primal result is identical. The added test case has the setting SINGLEZONE_DRIVER= YES.

DynamicMeshUpdate(ExtIter);
}

Expand Down
212 changes: 208 additions & 4 deletions SU2_CFD/src/numerics_direct_mean_inc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,15 @@ CUpwFDSInc_Flow::~CUpwFDSInc_Flow(void) {

void CUpwFDSInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_Jacobian_i, su2double **val_Jacobian_j, CConfig *config) {

su2double U_i[5] = {0.0,0.0,0.0,0.0,0.0}, U_j[5] = {0.0,0.0,0.0,0.0,0.0};
su2double ProjGridVel = 0.0;

AD::StartPreacc();
AD::SetPreaccIn(V_i, nDim+9); AD::SetPreaccIn(V_j, nDim+9); AD::SetPreaccIn(Normal, nDim);
if (dynamic_grid) {
AD::SetPreaccIn(GridVel_i, nDim);
AD::SetPreaccIn(GridVel_j, nDim);
}

/*--- Face area (norm or the normal vector) ---*/

Expand Down Expand Up @@ -120,6 +127,16 @@ void CUpwFDSInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_J
ProjVelocity += MeanVelocity[iDim]*Normal[iDim];
}

/*--- Projected velocity adjustment due to mesh motion ---*/

if (dynamic_grid) {
ProjGridVel = 0.0;
for (iDim = 0; iDim < nDim; iDim++) {
ProjGridVel += 0.5*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];
}
ProjVelocity -= ProjGridVel;
}

/*--- Mean variables at points iPoint and jPoint ---*/

MeanDensity = 0.5*(DensityInc_i + DensityInc_j);
Expand Down Expand Up @@ -214,6 +231,38 @@ void CUpwFDSInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_J
}
}

/*--- Corrections due to grid motion ---*/
if (dynamic_grid) {

/*--- Recompute conservative variables ---*/

U_i[0] = DensityInc_i; U_j[0] = DensityInc_j;
for (iDim = 0; iDim < nDim; iDim++) {
U_i[iDim+1] = DensityInc_i*Velocity_i[iDim]; U_j[iDim+1] = DensityInc_j*Velocity_j[iDim];
}
U_i[nDim+1] = DensityInc_i*Enthalpy_i; U_j[nDim+1] = DensityInc_j*Enthalpy_j;

ProjVelocity = 0.0;
for (iDim = 0; iDim < nDim; iDim++)
ProjVelocity += 0.5*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];

/*--- Residual contributions ---*/
for (iVar = 0; iVar < nVar; iVar++) {
val_residual[iVar] -= ProjVelocity * 0.5*(U_i[iVar]+U_j[iVar]);

/*--- Jacobian contributions ---*/
/*--- Implicit terms ---*/
if (implicit) {
for (iDim = 0; iDim < nDim; iDim++){
val_Jacobian_i[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_i;
val_Jacobian_j[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_j;
}
val_Jacobian_i[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_i*Cp_i;
val_Jacobian_j[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_j*Cp_j;
}
}
}

if (!energy) {
val_residual[nDim+1] = 0.0;
if (implicit) {
Expand Down Expand Up @@ -277,6 +326,9 @@ CCentJSTInc_Flow::~CCentJSTInc_Flow(void) {

void CCentJSTInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_Jacobian_i, su2double **val_Jacobian_j, CConfig *config) {

su2double U_i[5] = {0.0,0.0,0.0,0.0,0.0}, U_j[5] = {0.0,0.0,0.0,0.0,0.0};
su2double ProjGridVel = 0.0;

/*--- Primitive variables at point i and j ---*/

Pressure_i = V_i[0]; Pressure_j = V_j[0];
Expand Down Expand Up @@ -336,7 +388,39 @@ void CCentJSTInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_
}
}
}


/*--- Corrections due to grid motion ---*/
if (dynamic_grid) {

/*--- Recompute conservative variables ---*/

U_i[0] = DensityInc_i; U_j[0] = DensityInc_j;
for (iDim = 0; iDim < nDim; iDim++) {
U_i[iDim+1] = DensityInc_i*Velocity_i[iDim]; U_j[iDim+1] = DensityInc_j*Velocity_j[iDim];
}
U_i[nDim+1] = DensityInc_i*Enthalpy_i; U_j[nDim+1] = DensityInc_j*Enthalpy_j;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have all of the mean quantities computed, is it necessary to recompute here?

This might be a compressible vs incompressible difference but, in compressible flows only Energy gets affected by grid motion, is it completely equivalent to use Enthalpy here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the main changes to the governing equations for the incompressible solver is the simplified energy equation. The final term in the convective flux for the low Mach equations used in the incompressible solver is rhoCpT*v. As part of the change to account for grid motion, the grid velocity is removed from all the velocity terms in the incompressible convective flux, similar to the compressible flow, which I think should still hold true with enthalpy.


su2double ProjVelocity = 0.0;
for (iDim = 0; iDim < nDim; iDim++)
ProjVelocity += 0.5*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];

/*--- Residual contributions ---*/
for (iVar = 0; iVar < nVar; iVar++) {
val_residual[iVar] -= ProjVelocity * 0.5*(U_i[iVar]+U_j[iVar]);

/*--- Jacobian contributions ---*/
/*--- Implicit terms ---*/
if (implicit) {
for (iDim = 0; iDim < nDim; iDim++){
val_Jacobian_i[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_i;
val_Jacobian_j[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_j;
}
val_Jacobian_i[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_i*Cp_i;
val_Jacobian_j[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_j*Cp_j;
}
}
}

/*--- Computes differences between Laplacians and conservative variables ---*/

for (iVar = 0; iVar < nVar; iVar++) {
Expand All @@ -351,6 +435,17 @@ void CCentJSTInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_
/*--- Compute the local spectral radius of the preconditioned system
and the stretching factor. ---*/

/*--- Projected velocity adjustment due to mesh motion ---*/

if (dynamic_grid) {
ProjGridVel = 0.0;
for (iDim = 0; iDim < nDim; iDim++) {
ProjGridVel += 0.5*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];
}
ProjVelocity_i -= ProjGridVel;
ProjVelocity_j -= ProjGridVel;
}

SoundSpeed_i = sqrt(BetaInc2_i*Area*Area);
SoundSpeed_j = sqrt(BetaInc2_j*Area*Area);

Expand Down Expand Up @@ -396,7 +491,6 @@ void CCentJSTInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_
}
}
}

}

CCentLaxInc_Flow::CCentLaxInc_Flow(unsigned short val_nDim, unsigned short val_nVar, CConfig *config) : CNumerics(val_nDim, val_nVar, config) {
Expand Down Expand Up @@ -442,6 +536,9 @@ CCentLaxInc_Flow::~CCentLaxInc_Flow(void) {

void CCentLaxInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_Jacobian_i, su2double **val_Jacobian_j, CConfig *config) {

su2double U_i[5] = {0.0,0.0,0.0,0.0,0.0}, U_j[5] = {0.0,0.0,0.0,0.0,0.0};
su2double ProjGridVel = 0.0, ProjVelocity = 0.0;

/*--- Primitive variables at point i and j ---*/

Pressure_i = V_i[0]; Pressure_j = V_j[0];
Expand Down Expand Up @@ -503,7 +600,38 @@ void CCentLaxInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_
}
}
}


/*--- Corrections due to grid motion ---*/
if (dynamic_grid) {

/*--- Recompute conservative variables ---*/

U_i[0] = DensityInc_i; U_j[0] = DensityInc_j;
for (iDim = 0; iDim < nDim; iDim++) {
U_i[iDim+1] = DensityInc_i*Velocity_i[iDim]; U_j[iDim+1] = DensityInc_j*Velocity_j[iDim];
}
U_i[nDim+1] = DensityInc_i*Enthalpy_i; U_j[nDim+1] = DensityInc_j*Enthalpy_j;

for (iDim = 0; iDim < nDim; iDim++)
ProjVelocity += 0.5*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];

/*--- Residual contributions ---*/
for (iVar = 0; iVar < nVar; iVar++) {
val_residual[iVar] -= ProjVelocity * 0.5*(U_i[iVar]+U_j[iVar]);

/*--- Jacobian contributions ---*/
/*--- Implicit terms ---*/
if (implicit) {
for (iDim = 0; iDim < nDim; iDim++){
val_Jacobian_i[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_i;
val_Jacobian_j[iDim+1][iDim+1] -= 0.5*ProjVelocity*DensityInc_j;
}
val_Jacobian_i[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_i*Cp_i;
val_Jacobian_j[nDim+1][nDim+1] -= 0.5*ProjVelocity*DensityInc_j*Cp_j;
}
}
}

/*--- Computes differences btw. conservative variables ---*/

for (iVar = 0; iVar < nVar; iVar++)
Expand All @@ -519,6 +647,17 @@ void CCentLaxInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_
SoundSpeed_i = sqrt(BetaInc2_i*Area*Area);
SoundSpeed_j = sqrt(BetaInc2_j*Area*Area);

/*--- Projected velocity adjustment due to mesh motion ---*/

if (dynamic_grid) {
ProjGridVel = 0.0;
for (iDim = 0; iDim < nDim; iDim++) {
ProjGridVel += 0.5*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];
}
ProjVelocity_i -= ProjGridVel;
ProjVelocity_j -= ProjGridVel;
}

Local_Lambda_i = fabs(ProjVelocity_i)+SoundSpeed_i;
Local_Lambda_j = fabs(ProjVelocity_j)+SoundSpeed_j;

Expand Down Expand Up @@ -558,7 +697,6 @@ void CCentLaxInc_Flow::ComputeResidual(su2double *val_residual, su2double **val_
}
}
}

}

CAvgGradInc_Flow::CAvgGradInc_Flow(unsigned short val_nDim,
Expand Down Expand Up @@ -852,6 +990,72 @@ void CSourceIncBodyForce::ComputeResidual(su2double *val_residual, CConfig *conf

}

CSourceIncRotatingFrame_Flow::CSourceIncRotatingFrame_Flow(unsigned short val_nDim, unsigned short val_nVar, CConfig *config) : CNumerics(val_nDim, val_nVar, config) {

implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT);

Gamma = config->GetGamma();
Gamma_Minus_One = Gamma - 1.0;

/*--- Retrieve the angular velocity vector from config. ---*/
for (unsigned short iDim = 0; iDim < 3; iDim++)
Omega[iDim] = config->GetRotation_Rate(iDim)/config->GetOmega_Ref();

}

CSourceIncRotatingFrame_Flow::~CSourceIncRotatingFrame_Flow(void) { }

void CSourceIncRotatingFrame_Flow::ComputeResidual(su2double *val_residual, su2double **val_Jacobian_i, CConfig *config) {

unsigned short iDim, iVar, jVar;
su2double Momentum[3] = {0,0,0},
Velocity_i[3] = {0,0,0};

/*--- Primitive variables plus momentum at the node (point i) ---*/

DensityInc_i = V_i[nDim+2];

for (iDim = 0; iDim < nDim; iDim++) {
Velocity_i[iDim] = V_i[iDim+1];
Momentum[iDim] = DensityInc_i*Velocity_i[iDim];
}

/*--- Calculate rotating frame source term residual as ( Omega X Rho-U ) ---*/

if (nDim == 2) {
val_residual[0] = 0.0;
val_residual[1] = (Omega[1]*Momentum[2] - Omega[2]*Momentum[1])*Volume;
val_residual[2] = (Omega[2]*Momentum[0] - Omega[0]*Momentum[2])*Volume;
val_residual[3] = 0.0;
} else {
val_residual[0] = 0.0;
val_residual[1] = (Omega[1]*Momentum[2] - Omega[2]*Momentum[1])*Volume;
val_residual[2] = (Omega[2]*Momentum[0] - Omega[0]*Momentum[2])*Volume;
val_residual[3] = (Omega[0]*Momentum[1] - Omega[1]*Momentum[0])*Volume;
val_residual[4] = 0.0;
}

/*--- Calculate the source term Jacobian ---*/

if (implicit) {
for (iVar = 0; iVar < nVar; iVar++)
for (jVar = 0; jVar < nVar; jVar++)
val_Jacobian_i[iVar][jVar] = 0.0;
if (nDim == 2) {
val_Jacobian_i[1][2] = -DensityInc_i*Omega[2]*Volume;
val_Jacobian_i[2][1] = DensityInc_i*Omega[2]*Volume;
} else {
val_Jacobian_i[1][2] = -DensityInc_i*Omega[2]*Volume;
val_Jacobian_i[1][3] = DensityInc_i*Omega[1]*Volume;
val_Jacobian_i[2][1] = DensityInc_i*Omega[2]*Volume;
val_Jacobian_i[2][3] = -DensityInc_i*Omega[0]*Volume;
val_Jacobian_i[3][1] = -DensityInc_i*Omega[1]*Volume;
val_Jacobian_i[3][2] = DensityInc_i*Omega[0]*Volume;
}
}

}

CSourceBoussinesq::CSourceBoussinesq(unsigned short val_nDim, unsigned short val_nVar, CConfig *config) : CNumerics(val_nDim, val_nVar, config) {

/*--- Store the pointer to the constant body force vector. ---*/
Expand Down
Loading