Commit 5259ba74 authored by Andrés Mateo's avatar Andrés Mateo Committed by Andrea Cassinelli

SPM feature for IncNavierStokesSolver

parent 0492cc31
......@@ -5,7 +5,7 @@ v5.1.0
------
**Library**
- Restructure library to use local coefficient storage down to the GlobalLinSys
level. Removed GlobalCeoffs functionality (!963)
level. Removed GlobalCoeffs functionality (!963)
- Add interior penalty method to DG framework (!1101)
- Add an error filter for the time-evolution of the L2 and Linf errors (!1147)
......@@ -17,10 +17,16 @@ v5.1.0
- Use base MPI functions instead of the GS library in the trace exchange
for parallel DG simulations (!1112)
num_elements with size() (!1127, !1137, !1141)
- Add phifile module to compute shape functions for the SPM solver (!1065)
**CardiacEPSolver**
- Added additional parameter sets to Fenton-Karma model (!1119)
**IncNavierStokesSolver**
- Add Smoothed Profile Method (SPM) for the formulation of immersed boundaries
(!1065)
- Add new filter AeroForcesSPM to compute aerodynamic forces in immersed
boundaries (!1065)
**Documentation**:
- Updated Windows source build instructions in user guide (!1152)
......
......@@ -547,3 +547,47 @@ year = {2016}
school = {Technische Universität Darmstadt},
url = {http://tuprints.ulb.tu-darmstadt.de/id/eprint/7611},
}
@article{NakayamaSPM,
title = {Simulation method to resolve hydrodynamic interactions in colloidal dispersions},
author = {Nakayama, Yasuya and Yamamoto, Ryoichi},
journal = {Phys. Rev. E},
volume = {71},
issue = {3},
pages = {036707},
numpages = {7},
year = {2005},
month = {Mar},
publisher = {American Physical Society},
doi = {10.1103/PhysRevE.71.036707},
url = {https://link.aps.org/doi/10.1103/PhysRevE.71.036707}
}
@article{LuoSPM,
abstract = {We re-formulate and analyze a new method for particulate flows, the so-called ``smoothed profile'' method (SPM) first proposed in [Y. Nakayama, R. Yamamoto, Simulation method to resolve hydrodynamic interactions in colloidal dispersions, Phys. Rev. E 71 (2005) 036707], which uses a fixed computational mesh without conformation to the geometry of the particles. The method represents the particles by certain smoothed profiles to construct a body force term added into the Navier--Stokes equations. SPM imposes accurately and efficiently the proper conditions at the particle--fluid interface. In particular, while the original method employs a fully-explicit time-integration scheme we develop a high-order semi-implicit splitting scheme, which we implement in the context of spectral/hp element discretization. First, we show that the modeling error of SPM has a non-monotonic dependence on the time step size \ensuremath{\Delta}t; it is a function of \ensuremath{\nu}\ensuremath{\Delta}t/\ensuremath{\xi}, where \ensuremath{\nu} is the kinematic viscosity of fluid and \ensuremath{\xi} is the interface thickness of the smoothed profile. Subsequently, we present several steady and unsteady simulations, including flow past 3D complex-shaped particles, and compare against direct numerical simulations and the force coupling method (FCM).},
author = {Luo, Xian and Maxey, Martin R. and Karniadakis, George Em},
doi = {10.1016/j.jcp.2008.11.006},
issn = {0021-9991},
journal = {Journal of Computational Physics},
keywords = {SPM, Two-phase flow, Suspensions, Time-splitting scheme},
number = {5},
pages = {1750--1769},
title = {{Smoothed profile method for particulate flows: Error analysis and simulations}},
url = {http://www.sciencedirect.com/science/article/pii/S0021999108005925},
volume = {228},
year = {2009}
}
@article{WangSPM,
abstract = {An accurate, fast and robust spectral-element/Fourier smoothed profile method (SEF-SPM) for turbulent flow past 3D complex-geometry moving bluff-bodies is developed and analyzed in this paper. Based on the concept of momentum thickness \ensuremath{\delta}2, a new formula for determining the interface thickness parameter \ensuremath{\xi} is proposed. In order to overcome the numerical instability at high Reynolds number, the so-called Entropy Viscosity Method (EVM) is introduced in the framework of large-eddy simulation. To overcome resolution constraints pertaining to moving immersed bodies, the Coordinate Transformation Method (Mapping method) is incorporated in the current implementation. Moreover, a hybrid spectral-element method using mixed triangular and quadrilateral elements is employed in conjunction with Fourier discretization along the third direction to efficiently represent a body of revolution or a long-aspect ratio bluff-body like risers and cables. The combination of the above algorithms results in a robust method which we validate by several prototype flows, including flow past a stationary sphere at 200 \ensuremath{\leq} Re \ensuremath{\leq} 1000, as well as turbulent flow past a stationary and moving cylinder at 80 \ensuremath{\leq} Re \ensuremath{\leq} 10, 000. Finally, we apply the new method to simulate a self-excited rigidly moving dual-step cylinder and demonstrate that SEF-SPM is an efficient method for complex VIV problems.},
author = {Wang, Zhicheng and Triantafyllou, Michael S and Constantinides, Yiannis and Karniadakis, George Em},
doi = {10.1016/j.compfluid.2018.06.022},
issn = {0045-7930},
journal = {Computers \& Fluids},
keywords = {High-order methods, LES, Entropy-viscosity, Hybrid discretization, Industrial flows},
pages = {84--96},
title = {{A spectral-element/Fourier smoothed profile method for large-eddy simulations of complex VIV problems}},
url = {http://www.sciencedirect.com/science/article/pii/S0045793018303529},
volume = {172},
year = {2018}
}
\documentclass{standalone}
\usepackage[x11names]{xcolor}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=2.5]
\fill[SkyBlue1!70] (-1.8,0) rectangle (0,1);
\fill[SlateGray4!50] (0,0) rectangle (1.8,1);
\draw[thick,->] (-2,0) -- (2,0);
\draw[thick,->] (0,0) -- (0,1.2);
\draw[domain=-2:2,very thick,variable=\x,red] plot ({\x},{0.5*(tanh(\x)+1)});
\draw[domain=-2:2,very thick,variable=\x,blue] plot[samples=100] ({\x},{0.5*(tanh(3*\x)+1)});
\draw[-,dashed] (-2,1) node[above] {$\Phi=1$} -- (2,1);
\node at (1,0.4) {body};
\node at (-1,0.6) {fluid};
\end{tikzpicture}
\end{document}
......@@ -197,6 +197,8 @@ possibly also Reynolds stresses) into single file;
\item \inltt{surfdistance}: Computes height of a prismatic boundary layer mesh and projects onto the surface (for e.g. $y^+$ calculation).
\item \inltt{vorticity}: Computes the vorticity field.
\item \inltt{wss}: Computes wall shear stress field.
\item \inltt{phifile}: Computes the $\Phi$ function representing a body defined
in an \inltt{.stl} file. Useful for the Smoothed Profile Method solver.
\end{enumerate}
The module list above can be seen by running the command
%
......@@ -1084,6 +1086,58 @@ To process the output file(s) you will need an xml file of the same region.
%
%
\subsection{Calculating the shape function $\Phi$ for an SPM case:
\textit{phifile} module}
\label{s:utilities:fieldconvert:sub:phifile}
\begin{notebox}
This module is in experimental phase and only runs in serial. When reading
3D geometries from \inltt{.stl} files, errors may occur if triangles are
placed exactly at $90^{\circ}$.
\end{notebox}
This FieldConvert module converts a binary \inltt{.stl} CAD file into
\inltt{.fld} or \inltt{.vtu}/\inltt{.dat} files that can be used as inputs for
the Smoothed Profile Method solver. Running the command:
\begin{lstlisting}[style=BashInputStyle]
FieldConvert -m phifile:file=geom.stl:scale=value session.xml geom.fld
\end{lstlisting}
will generate an output file \inltt{geom.fld} with all the information required
to define a shape function $\Phi$ representing the geometry specified in
\inltt{geom.stl}. The option \inltt{scale} sets the value of $\xi$ as it is
described in the Synopsis chapter of the Incompressible N-S solver. If the
output file gets the extension \inltt{.vtu} or \inltt{.dat}, the module will
produce a graphical representation of the shape function; however, the
recommended way to proceed is to generate an \inltt{.fld} file and then, use
FieldConvert to obtain the \inltt{.vtu} or \inltt{.dat} files if needed for
visualisation purposes:
\begin{lstlisting}[style=BashInputStyle]
FieldConvert -m phifile:file=geom.stl:scale=value session.xml geom.fld
FieldConvert session.xml geom.fld geom.vtu
\end{lstlisting}
This module can also be used to produce a \inltt{.fld} and \inltt{.vtu} /
\inltt{.dat} file of shapes defined directly in the session file through an
analytical expression. In this case, the commands simplify to:
\begin{lstlisting}[style=BashInputStyle]
FieldConvert -m phifile session.xml geom.fld
FieldConvert session.xml geom.fld geom.vtu
\end{lstlisting}
The algorithm computes an octree for the triangles that define the 3D object
in the \inltt{.stl} file, and then loops over all the nodes of the
computational mesh looking for the shortest distance to the 3D object. Since
this module is currently in experimental phase, it only runs in serial and
therefore its performance in computing the shape function from the \inltt{.stl}
file is limited, especially in 3D cases. In addition to this, it is recommended
to make sure that the angles between triangles are not strictly equal to
$90^\circ$, since the algorithm will probably fail to find the real $\Phi$
function.
%
%
%
\subsection{Manipulating meshes with FieldConvert}
FieldConvert has support for two modules that can be used in conjunction with
the linear elastic solver, as shown in chapter~\ref{s:elasticity}. To do this,
......
......@@ -133,6 +133,56 @@ During the execution a file named \inltt{DragLift.fce} will be created and the
value of the aerodynamic forces on boundaries 1 and 2, defined in the
\inltt{GEOMETRY} section, will be output every 10 time steps.
\subsubsection{Extension for the SPM formulation}\label{filters:sub:ForcesSPM}
\begin{notebox}
This filter is only supported for the incompressible Navier-Stokes solver
with the Smoothed Profile Method.
\end{notebox}
The lack of physical boundaries in the Smoothed Profile Method requires an
alternative formulation to calculate the aerodynamic forces. Since the method
imposes the boundary geometry by adding an impulse to the flow proportional to
the difference between the flow velocity and the expected velocity of the
immersed bodies, the forces in this filter are computed by integrating this
difference where $\Phi \neq 0$~\cite{LuoSPM}:
\begin{equation*}
\frac{\mathbf{F}^n}{\rho} = \frac{1}{\Delta t} \int_{\Omega}
\Phi^{n+1}(\mathbf{u^*} - \mathbf{u^n}_p)~\text{d}\Omega
\end{equation*}
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \inltt{session} &
Prefix of the output filename to which the forces are written.\\
\inltt{Frequency} & \xmark & 1 &
Number of timesteps after which the output is written.\\
\inltt{StartTime} & \xmark & 0 &
Forces before this instant are not written to the output.\\
\bottomrule
\end{tabularx}
\end{center}
For instance, a block like the following
\begin{lstlisting}[style=XMLStyle]
<FILTER TYPE="AeroForcesSPM">
<PARAM NAME="OutputFile"> Forces </PARAM>
<PARAM NAME="OutputFrequency"> 10 </PARAM>
<PARAM NAME="StartTime"> 50.0 </PARAM>
</FILTER>
\end{lstlisting}
will generate a file called \inltt{Forces.fce} with the values of the forces
in the ($X,Y,Z$) directions, that must be scaled with the density of the
fluid to get the real values. It is important to remark that the computed
values are the sum of all the boundaries defined by $\Phi$.
\subsection{Benchmark}\label{filters:Benchmark}
\begin{notebox}
......@@ -699,4 +749,4 @@ which produces a field file \inlsh{threshold\_max.fld}.
\subsection{ThresholdMin value}\label{filters:ThresholdMin}
Performs the same function as the \inltt{ThresholdMax} filter (see Section~\ref{filters:thresholdmax}) but records the
time at which the threshold variable drops below a prescribed value.
\ No newline at end of file
time at which the threshold variable drops below a prescribed value.
......@@ -2,6 +2,7 @@ SET(FieldUtilsHeaders
Module.h
Field.hpp
Interpolator.h
Octree.h
InputModules/InputDat.h
InputModules/InputFld.h
InputModules/InputXml.h
......@@ -43,6 +44,7 @@ SET(FieldUtilsHeaders
ProcessModules/ProcessNumModes.h
ProcessModules/ProcessMean.h
ProcessModules/ProcessMeanMode.h
ProcessModules/ProcessPhiFromFile.h
ProcessModules/ProcessPointDataToFld.h
ProcessModules/ProcessPrintFldNorms.h
ProcessModules/ProcessRemoveField.h
......@@ -61,6 +63,7 @@ SET(FieldUtilsHeaders
SET(FieldUtilsSources
Module.cpp
Interpolator.cpp
Octree.cpp
InputModules/InputDat.cpp
InputModules/InputFld.cpp
InputModules/InputXml.cpp
......@@ -102,6 +105,7 @@ SET(FieldUtilsSources
ProcessModules/ProcessNumModes.cpp
ProcessModules/ProcessMean.cpp
ProcessModules/ProcessMeanMode.cpp
ProcessModules/ProcessPhiFromFile.cpp
ProcessModules/ProcessPointDataToFld.cpp
ProcessModules/ProcessPrintFldNorms.cpp
ProcessModules/ProcessRemoveField.cpp
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////
//
// File Octree.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Octree header.
//
///////////////////////////////////////////////////////////////////////////////
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <vector>
#include <memory>
#include <limits>
namespace Nektar
{
namespace FieldUtils
{
class Octree
{
class Octant;
using OctantSharedPtr = std::shared_ptr<Octant>;
using OctantWeakPtr = std::weak_ptr<Octant>;
public:
// Empty constructor
Octree();
// Constructor with bounds
Octree(const Array<OneD, Array<OneD, NekDouble> > &pts, int maxPts,
const Array<OneD, NekDouble> &bounds);
// Constructor without bounds
Octree(const Array<OneD, Array<OneD, NekDouble> > &pts, int maxPts);
// Returns the ID of the leaf node that contains 'coords'
int QueryNode(const Array<OneD, NekDouble> &coords,
int depth=std::numeric_limits<int>::max());
// Returns the ID of the point in 'pts' closest to 'coords'
int QueryClosest(const Array<OneD, Array<OneD, NekDouble> > &pts,
const Array<OneD, NekDouble> &coords, double &distance,
int pointInd=-1);
// Returns the ID of the points inside the node 'nodeID'
std::vector<int> QueryPoints(int nodeID);
// Returns the IDs of the leaf nodes neighbouring 'nodeID'
std::vector<int> QueryNeighbours(int nodeID);
int QueryNpoints(int nodeID) { return m_nodes[nodeID]->GetNpoints(); }
int QueryLocation(int nodeID) { return m_nodes[nodeID]->GetLoc(); }
int QueryDepth(int nodeID) { return m_nodes[nodeID]->GetDepth(); }
int QueryDelta(int nodeID) { return m_nodes[nodeID]->GetDelta(); }
// Get some statistics about the octree
void GetStats(int &maxPts, int &nPts, int &nNodes,
int &nLeaves, int &depth);
private:
class Octant : public std::enable_shared_from_this<Octant>
{
public:
// Empty constructor
Octant();
// Constructor
Octant(int loc, int depth, int id, const Array<OneD,
NekDouble> &bounds);
// Copy constructor
Octant(int loc, Octant &parent);
int GetNpoints() const { return m_nPts; }
int GetLoc() const { return m_loc; }
int GetDepth() const { return m_depth; }
double GetDelta() const { return m_delta; }
int GetID() const { return m_id; }
bool IsLeaf() const { return m_isLeaf; }
Array<OneD, NekDouble>& GetCentre() { return m_centre; }
Array<OneD, NekDouble>& GetBounds() { return m_bounds; }
std::vector<int>& GetIndices() { return m_pointInd; }
Array<OneD, OctantSharedPtr>& GetChildren() { return m_children; }
std::vector<OctantWeakPtr>& GetNeighbours() { return m_neighbours; }
void SetID(int id) { m_id = id; }
void GetLeaves(std::vector<OctantSharedPtr>& leaves);
void SetIndices(const std::vector<int> &indices);
void AddNeighbours(const std::vector<OctantSharedPtr> &neighbours);
void AddPoints(const Array<OneD, Array<OneD, NekDouble> > &pts,
const std::vector<int> &indices);
void Subdivide(int maxPts,
const Array<OneD, Array<OneD, NekDouble> > &pts,
std::vector<OctantSharedPtr> &nodes);
int GetLocInNode(const Array<OneD, NekDouble> &coords);
private:
/// Number of points in the octant
int m_nPts;
/// Position in the father octant (1-8)
int m_loc;
/// Depth in octree (root is 1)
int m_depth;
/// ID of the octant (index in 'm_nodes' vector)
int m_id;
/// Length of the octant side
double m_delta;
/// Coordinates of the centre of the octant
Array<OneD, NekDouble> m_centre;
/// Min/max coordinates of the octant (x, y, z)
Array<OneD, NekDouble> m_bounds;
/// Indices of the points comprised by the octant
std::vector<int> m_pointInd;
/// True for a leaf octant, false otherwise
bool m_isLeaf;
/// Vector of pointers to the children octants
Array<OneD, OctantSharedPtr> m_children;
/// Vector of pointers to the neighbouring octants
std::vector<OctantWeakPtr> m_neighbours;
};
/// Max points allowed in each octant
int m_maxPts;
/// Number of points in the mesh
int m_nMshPts;
/// Number of octants in the tree
int m_nNodes;
/// Number of leaf nodes in the tree
int m_nLeaves;
/// Maximum depth of the tree
int m_maxDepth;
/// First node of the tree, linked to the rest
OctantSharedPtr m_root;
/// Vector of pointers to every octant in the tree
std::vector<OctantSharedPtr> m_nodes;
void AdvanceToStats(int nodeID);
void SetNeighbours(int nodeID);
};
}
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////
//
// File: ProcessPhiFromFile.h
//
// For more information, please see: http://www.nektar.info/
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: geometry file converter.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef FIELDUTILS_PROCESSPHIFROMFILE
#define FIELDUTILS_PROCESSPHIFROMFILE
#include "../Module.h"
#include "../Octree.h"
#include <random>
namespace Nektar
{
namespace FieldUtils
{
/**
* Converter for STL files.
*/
class ProcessPhiFromFile : public ProcessModule
{
public:
/// Creates an instance of this class
static ModuleSharedPtr create(FieldSharedPtr f)
{
return MemoryManager<ProcessPhiFromFile>::AllocateSharedPtr(f);
}
/// ModuleKey for class.
static ModuleKey m_className;
ProcessPhiFromFile(FieldSharedPtr f);
virtual ~ProcessPhiFromFile();
virtual void Process(po::variables_map &vm);
virtual std::string GetModuleName()
{
return "ProcessPhiFromFile";
}
virtual std::string GetModuleDescription()
{
return "Processing input STL file to calculate Phi";
}
virtual ModulePriority GetModulePriority()
{
return eModifyExp;
}
protected:
/// Object representing a 3D triangle
struct triangle
{
Array<OneD, NekDouble> normal;
Array<OneD, NekDouble> v0;
Array<OneD, NekDouble> v1;
Array<OneD, NekDouble> v2;
Array<OneD, NekDouble> centroid;
triangle() : normal(3, 0.0), v0(3, 0.0), v1(3, 0.0), v2(3, 0.0) {}
};
/// STL file object
struct STLobject
{
// Number of triangles
NekUInt32 numTri;
// Triangles definition
Array<OneD, triangle> triangles;
};
/// Octree object
Octree m_tree;
// Reads one vector from a binary STL file
Array<OneD, NekDouble> ReadVector(std::ifstream &in);
// Reads an STL file and returns an 'STLobject' struct
STLobject ReadSTL(std::string filename);
// Smoothing function
NekDouble PhiFunction(double dist, double coeff);
// Calculates Phi from 'ShapeFunction' in the session file
void GetPhifromSession();
// Calculates Phi from an external STL binary file
void GetPhifromSTL(const STLobject &file);
// Checks if a ray hits a specific 3D triangle
bool CheckHit(const triangle &tri,
const Array<OneD, NekDouble> &Origin,
const Array<OneD, NekDouble> &Dvec,
double &distance, double &u, double &v);
// Shortest distance from a point to a 3D geometry
void FindShortestDist(const STLobject &file,
const Array<OneD, NekDouble> &x,
double &dist);
// Utility to find if two doubles are equal
bool IsEqual(double x, double y, double relTol);
// Utility to find if a double is negative with a certain tolerance
bool IsNegative(double x, double tol);
// Utility to calculate the cross-product of two 3D vectors
Array<OneD, NekDouble> Cross(const Array<OneD, NekDouble> &v0,
const Array<OneD, NekDouble> &v1);
// Utility to measure shortest distance to a segment
Array<OneD, NekDouble> Vector2edge(const Array<OneD, NekDouble> &x,
const Array<OneD, NekDouble> &e1,
const Array<OneD, NekDouble> &e2);
private:
};
}
}
#endif // FIELDUTILS_PROCESSPHIFROMFILE
......@@ -15,6 +15,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
./EquationSystems/IncNavierStokes.cpp
./EquationSystems/VelocityCorrectionScheme.cpp
./EquationSystems/VelocityCorrectionSchemeWeakPressure.cpp
./EquationSystems/SmoothedProfileMethod.cpp
./EquationSystems/VCSMapping.cpp
./EquationSystems/Extrapolate.cpp
./EquationSystems/StandardExtrapolate.cpp
......@@ -30,6 +31,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
./AdvectionTerms/NoAdvection.cpp
./Filters/FilterReynoldsStresses.cpp
./Filters/FilterMovingBody.cpp
./Filters/FilterAeroForcesSPM.cpp
./Forcing/ForcingMovingBody.cpp
./Forcing/ForcingStabilityCoupledLNS.cpp
)
......@@ -122,6 +124,9 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_NEKTAR_TEST(ChanFlow_m8_Flowrate)
ADD_NEKTAR_TEST(ChanFlow_3DH1D_FlowrateExplicit_MVM)
ADD_NEKTAR_TEST(PhaseSampling)
ADD_NEKTAR_TEST(CylFlow2D_SPM)
ADD_NEKTAR_TEST(CylFlow2DMov_SPM)
ADD_NEKTAR_TEST(CylFlow3DH1D_SPM)
IF (NEKTAR_USE_SCOTCH)
# This tests exhibits sensitivity to the choice of DirectStaticCond
......
///////////////////////////////////////////////////////////////////////////////
//
// File SmoothedProfileMethod.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Smoothed Profile Method header
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_SOLVERS_SMOOTHEDPROFILEMETHOD_H
#define NEKTAR_SOLVERS_SMOOTHEDPROFILEMETHOD_H
#include <IncNavierStokesSolver/EquationSystems/VelocityCorrectionScheme.h>
#include <fstream>
namespace Nektar
{
class SmoothedProfileMethod: public VelocityCorrectionScheme
{
public:
/// Creates an instance of this class
static SolverUtils::EquationSystemSharedPtr create(
const LibUtilities::SessionReaderSharedPtr& pSession,
const SpatialDomains::MeshGraphSharedPtr &pGraph)
{
SolverUtils::EquationSystemSharedPtr p =
MemoryManager<SmoothedProfileMethod>::AllocateSharedPtr(
pSession, pGraph);
p->InitObject();
return p;
}
/// Name of class
static std::string className;
//Constructor
SmoothedProfileMethod(
const LibUtilities::SessionReaderSharedPtr& pSession,
const SpatialDomains::MeshGraphSharedPtr &pGraph);
// Destructor
virtual ~SmoothedProfileMethod();
virtual void v_InitObject();
virtual void v_GenerateSummary(SolverUtils::SummaryList& s);
// Solves the linear part of the velocity correction scheme incluiding
// the SPM method calculation for 'fs'
void SolveUnsteadyStokesSystem(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,