Commit 5c0bed87 authored by Robin Basso's avatar Robin Basso

new test

parent 92300889
......@@ -179,8 +179,9 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
m_equ[0]->v_GetStruct(theta, thetadot);
theta = theta/alpha[0];
thetadot = thetadot/alpha[0];
// Send back the angle values to time marching solver
// Send back the angle values and scaling factor to time marching solver
m_equ[0]->v_SetStruct(theta, thetadot);
m_equ[0]->v_SetScalingFactor(alpha[0]);
}
// Fill initial krylov sequence
......@@ -204,6 +205,7 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
thetadot = thetadot/alpha[i];
// Send back the angle values to time marching solver
m_equ[0]->v_SetStruct(theta, thetadot);
m_equ[0]->v_SetScalingFactor(alpha[i]);
}
// Copy Krylov sequence into temporary storage
......@@ -265,6 +267,7 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
thetadot = thetadot/alpha[m_kdim];
// Send back the angle values to time marching solver
m_equ[0]->v_SetStruct(theta, thetadot);
m_equ[0]->v_SetScalingFactor(alpha[m_kdim]);
}
// Copy Krylov sequence into temporary storage
......
......@@ -1045,6 +1045,17 @@ namespace Nektar
"Blowing/Suction BS's only implemented to Direct solver yet.");
}
/**
* Virtual finction defined in IncNavierStokes for
* Blowing/Suction boundary conditions type
*/
void EquationSystem::v_SetScalingFactor(NekDouble &alpha)
{
bool condition = false;
ASSERTL0(condition,
"Blowing/Suction BS's only implemented to Direct solver yet.");
}
/**
* Virtual finction defined in IncNavierStokes for
* Blowing/Suction boundary conditions type
......
......@@ -341,6 +341,9 @@ class Interpolator;
/// Virtual function to set structural variables in BS-BC's type
SOLVER_UTILS_EXPORT virtual void v_SetStruct(NekDouble &angle, NekDouble &angleVel);
/// Virtual function to set structural variables in BS-BC's type
SOLVER_UTILS_EXPORT virtual void v_SetScalingFactor(NekDouble &alpha);
/// Virtual function to get BS-BC flag
SOLVER_UTILS_EXPORT virtual bool v_CheckBSBC();
......
......@@ -892,20 +892,7 @@ namespace Nektar
////////// TEST angleVel = sigma * exp(sigma * t) ///////
NekDouble sigma = 6.7256e-02;
NekDouble timeCopy = time;
m_bsbcParams->m_iter += 1;
while (timeCopy > m_finTime)
{
timeCopy -= m_finTime;
}
if ((m_bsbcParams->m_iter % m_numSteps) == 0)
{
m_bsbcParams->m_previousAngle = m_bsbcParams->m_angle;
}
if ((m_bsbcParams->m_iter % m_numSteps) == 1)
{
m_bsbcParams->m_alpha = m_bsbcParams->m_previousAngle/m_bsbcParams->m_angle;
}
m_bsbcParams->m_angleVel[0] = (1/m_bsbcParams->m_alpha) * sigma * exp(sigma * time);
m_bsbcParams->m_angle = (1/m_bsbcParams->m_alpha) * exp(sigma * time);
////////////////////////////////////////////////////////
......@@ -1229,12 +1216,11 @@ namespace Nektar
}
// Initialise variables
m_bsbcParams->m_angle = 0.001;
m_bsbcParams->m_previousAngle = 0.001;
m_bsbcParams->m_angleVel = Array<OneD,NekDouble> (m_intSteps, 0.001);
m_bsbcParams->m_angle = 0.0;
m_bsbcParams->m_previousAngle = 0.0;
m_bsbcParams->m_angleVel = Array<OneD,NekDouble> (m_intSteps, 0.0);
m_bsbcParams->m_moment = Array<OneD,NekDouble> (m_intSteps, 0.0);
m_bsbcParams->m_alpha = 1;
m_bsbcParams->m_iter = 0;
// Initialise constants for the BC sclaing
SetStructConsts();
......@@ -1437,6 +1423,14 @@ namespace Nektar
m_bsbcParams->m_angleVel[0] = angleVel;
}
/**
*
*/
void IncNavierStokes::v_SetScalingFactor(NekDouble &alpha)
{
m_bsbcParams->m_alpha = alpha;
}
/**
*
*/
......
......@@ -182,8 +182,6 @@ namespace Nektar
Array<OneD, bool> m_isBlowingSuction;
NekDouble m_alpha;
int m_iter;
// Coefficients for Adams time-integration
// NekDouble AdamsBashforth_coeffs[3][3];
......@@ -248,6 +246,9 @@ namespace Nektar
/// Return theta and theta dot
virtual void v_SetStruct(NekDouble &angle, NekDouble &angleVel);
/// Return scaling factor
virtual void v_SetScalingFactor(NekDouble &alpha);
/// Set BSBC flag
virtual bool v_CheckBSBC();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment