Commit ba0c50cf authored by Robin Basso's avatar Robin Basso

test arnoldi adjoint

parent 82bcac00
......@@ -172,7 +172,7 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
m_comm->AllReduce(alpha[0], Nektar::LibUtilities::ReduceSum);
alpha[0] = std::sqrt(alpha[0]);
Vmath::Smul(ntot, 1.0/alpha[0], Kseq[0], 1, Kseq[0], 1);
cout<<"alpha[0] = "<<alpha[0];
// Scale angle if needed
if(m_BlowingSuction)
{
......@@ -195,7 +195,7 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
m_comm->AllReduce(alpha[i], Nektar::LibUtilities::ReduceSum);
alpha[i] = std::sqrt(alpha[i]);
Vmath::Smul(ntot, 1.0/alpha[i], Kseq[i], 1, Kseq[i], 1);
cout<<"alpha[i] = "<<alpha[i];
// Scale angle if needed
if(m_BlowingSuction)
{
......
......@@ -892,18 +892,27 @@ 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;
}
m_bsbcParams->m_angleVel[0] = 0.04 * sigma * exp(sigma * timeCopy);
m_bsbcParams->m_angle = exp(sigma * timeCopy);
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);
////////////////////////////////////////////////////////
cout<<"alpha = "<<m_bsbcParams->m_alpha<<endl;
if( m_bsbcParams->m_doOutput )
{
//m_bsbcParams->m_filterForces->Update(m_fields, time);
++m_bsbcParams->m_index;
if ( !(m_bsbcParams->m_index % m_bsbcParams->m_outputFrequency) )
{
......@@ -1220,9 +1229,12 @@ namespace Nektar
}
// Initialise variables
m_bsbcParams->m_angle = 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_angle = 0.001;
m_bsbcParams->m_previousAngle = 0.001;
m_bsbcParams->m_angleVel = Array<OneD,NekDouble> (m_intSteps, 0.001);
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();
......
......@@ -181,6 +181,9 @@ namespace Nektar
Array<OneD, bool> m_isBlowingSuction;
NekDouble m_alpha;
int m_iter;
// Coefficients for Adams time-integration
// NekDouble AdamsBashforth_coeffs[3][3];
......
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