Commit 33aa4dda authored by Spencer Sherwin's avatar Spencer Sherwin

Merge branch 'feature/Womersley' into 'master'

Feature/womersley: Pre-calculate Time invariant portion of Womersley Solution

See merge request nektar/nektar!814
parents 43eb5377 71291b23
...@@ -86,6 +86,7 @@ v5.0.0 ...@@ -86,6 +86,7 @@ v5.0.0
- Replace steady-state check based on difference of norms by check based on - Replace steady-state check based on difference of norms by check based on
norm of the difference, to be consistent with the compressible solver (!832) norm of the difference, to be consistent with the compressible solver (!832)
- Updated SVV to allow for the DGKernel extension (!851) - Updated SVV to allow for the DGKernel extension (!851)
- Pre-calculate Time invariant portion of Womersley Solution (!814)
**CompressibleFlowSolver** **CompressibleFlowSolver**
- Add 3D regression tests (!567) - Add 3D regression tests (!567)
......
...@@ -42,9 +42,10 @@ ...@@ -42,9 +42,10 @@
#include <LibUtilities/BasicUtils/SessionReader.h> #include <LibUtilities/BasicUtils/SessionReader.h>
#include <IncNavierStokesSolver/EquationSystems/Extrapolate.h> #include <IncNavierStokesSolver/EquationSystems/Extrapolate.h>
#include <SolverUtils/Forcing/Forcing.h> #include <SolverUtils/Forcing/Forcing.h>
#include <complex>
namespace Nektar namespace Nektar
{ {
enum EquationType enum EquationType
{ {
eNoEquationType, eNoEquationType,
...@@ -97,6 +98,8 @@ namespace Nektar ...@@ -97,6 +98,8 @@ namespace Nektar
}; };
typedef std::complex<double> NekComplexDouble;
struct WomersleyParams struct WomersleyParams
{ {
WomersleyParams(int dim) WomersleyParams(int dim)
...@@ -107,19 +110,22 @@ namespace Nektar ...@@ -107,19 +110,22 @@ namespace Nektar
virtual ~WomersleyParams() virtual ~WomersleyParams()
{}; {};
/// Real and imaginary velocity comp. of wom
std::vector<NekDouble> m_wom_vel_r;
std::vector<NekDouble> m_wom_vel_i;
/// Womersley BC constants // Real and imaginary velocity comp. of wom
std::vector<NekComplexDouble> m_wom_vel;
// Womersley BC constants
NekDouble m_radius; NekDouble m_radius;
NekDouble m_period; NekDouble m_period;
Array<OneD, NekDouble> m_axisnormal; Array<OneD, NekDouble> m_axisnormal;
// currently this needs to be the point in the middle of the // currently this needs to be the point in the middle of the
// axis but shoudl be generalised to be any point on the axis // axis but should be generalised to be any point on the axis
Array<OneD, NekDouble> m_axispoint; Array<OneD, NekDouble> m_axispoint;
// poiseuille flow and fourier coefficients
Array<OneD, Array<OneD, NekDouble> > m_poiseuille;
Array<OneD, Array<OneD, Array<OneD, NekComplexDouble> > > m_zvel;
}; };
typedef std::shared_ptr<WomersleyParams> WomersleyParamsSharedPtr; typedef std::shared_ptr<WomersleyParams> WomersleyParamsSharedPtr;
...@@ -137,22 +143,22 @@ namespace Nektar ...@@ -137,22 +143,22 @@ namespace Nektar
int GetNConvectiveFields(void) int GetNConvectiveFields(void)
{ {
return m_nConvectiveFields; return m_nConvectiveFields;
} }
Array<OneD, int> &GetVelocity(void) Array<OneD, int> &GetVelocity(void)
{ {
return m_velocity; return m_velocity;
} }
void AddForcing(const SolverUtils::ForcingSharedPtr& pForce); void AddForcing(const SolverUtils::ForcingSharedPtr& pForce);
protected: protected:
// pointer to the extrapolation class for sub-stepping and HOPBS // pointer to the extrapolation class for sub-stepping and HOPBS
ExtrapolateSharedPtr m_extrapolation; ExtrapolateSharedPtr m_extrapolation;
/// modal energy file /// modal energy file
std::ofstream m_mdlFile; std::ofstream m_mdlFile;
...@@ -217,10 +223,10 @@ namespace Nektar ...@@ -217,10 +223,10 @@ namespace Nektar
void SetWomersleyBoundary(const int fldid, const int bndid); void SetWomersleyBoundary(const int fldid, const int bndid);
/// Set Up Womersley details /// Set Up Womersley details
void SetUpWomersley(const int bndid, std::string womstr); void SetUpWomersley(const int fldid, const int bndid, std::string womstr);
/// Womersley parameters if required /// Womersley parameters if required
std::map<int,WomersleyParamsSharedPtr> m_womersleyParams; std::map<int, std::map<int,WomersleyParamsSharedPtr> > m_womersleyParams;
virtual MultiRegions::ExpListSharedPtr v_GetPressure() virtual MultiRegions::ExpListSharedPtr v_GetPressure()
{ {
......
...@@ -12,10 +12,10 @@ IF (NEKTAR_USE_VTK) ...@@ -12,10 +12,10 @@ IF (NEKTAR_USE_VTK)
vtkFiltersGeometry vtkFiltersCore) vtkFiltersGeometry vtkFiltersCore)
TARGET_LINK_LIBRARIES(VtkStripsToPolys LINK_PUBLIC vtkCommonCore vtkIOLegacy) TARGET_LINK_LIBRARIES(VtkStripsToPolys LINK_PUBLIC vtkCommonCore vtkIOLegacy)
ENDIF () ENDIF ()
ADD_UTILITIES_EXECUTABLE(VtkToPng COMPONENT utilities-extra SOURCES VtkToPng.cpp) ADD_UTILITIES_EXECUTABLE(VtkToPng COMPONENT utilities-extra SOURCES VtkToPng.cpp)
IF (VTK_MAJOR_VERSION LESS 6) IF (VTK_MAJOR_VERSION LESS 6)
TARGET_LINK_LIBRARIES(VtkToPng LINK_PUBLIC vtkCommon vtksys vtkViews vtkWidgets TARGET_LINK_LIBRARIES(VtkToPng LINK_PUBLIC vtkCommon vtksys vtkViews vtkWidgets
vtkRendering vtkIO) vtkRendering vtkIO)
ELSE () ELSE ()
TARGET_LINK_LIBRARIES(VtkToPng LINK_PUBLIC ${VTK_LIBRARIES}) TARGET_LINK_LIBRARIES(VtkToPng LINK_PUBLIC ${VTK_LIBRARIES})
......
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