Commit 7b7c21fc authored by Douglas Serson's avatar Douglas Serson

Merge branch 'master' into feature/tidySolvers

parents 974ffa13 6ec5b72b
......@@ -12,40 +12,70 @@ v5.0.0
- Use chrono in Timer (!807)
- Fix caching of FUNCTION tags that read from file and provide the same
functionality in FUNCTIONs defined for forcings (!759)
- Add patch to tinyxml to fix size_t vs int bug (!820)
- Add ARPACK thirdparty build capabilities (!828)
- Added native support for csv files in addititon to pts (!760 !835)
- Utilize LAPACK_DIR env variable to find the native blas/lapack install (!827)
- Remove StdExpansion use from MultiRegion (use Expansions instead). (!831)
- Move steady state check and CFL output from solvers to SolverUtils (!832)
- Remove DG advection implementation from EquationSystem (!832)
- Simplify RawType typedefs (!840)
- Remove unused files from BasicUtils (!841)
- Remove checks for old boost versions which are no longer supported (!841)
- Refactor ParseUtils to be more consistent (!843)
- Added support for using the distance to a specific region (e.g. outlet) in the
function definitions for the Absorption Forcing (!769)
- Improve performance of DisContField2D::v_ExtractTracePhys (!824)
- Fix small bug in Jacobian Energy (!857)
**NekMesh**:
- Add feature to read basic 2D geo files as CAD (!731)
- Add periodic boundary condition meshing in 2D (!733)
- Adjust boundary layer thickness in corners in 2D (!739)
- Add non-O BL meshing in 2D (!757)
- Add ability to compile CCIO library but tar file is not yet openly
- Add ability to compile CCIO library but tar file is not yet openly
available whist we seek permission from Simens (!799)
- Fix issue with reading CCM files due to definition of default arrays
- Fix issue with reading CCM files due to definition of default arrays
rather than a vector (!797)
- Fix inverted triangles and small memory issue in surface meshing (!798)
- Update for the CAD system, more advance self-healing and analysis (!822)
- Additional curve types in GEO reader: BSpline, Circle, Ellipse (!800)
- Fix default command line argument value (!823)
**FieldConvert**:
- Add input module for Semtex field files (!777)
- Fixed interppoints module (!760)
- Move StreamFunction utility to a FieldConvert module (!809)
- Extend wss module to compressible flows (!810)
- Allow explicitly setting bool options of FieldConvert modules as false (!811)
- Enable output to multiple files (!844)
- Allow using xml file without expansion tag in FieldConvert (!849)
**CompressibleFlowSolver**
- Add 3D regression tests (!567)
**Documentation**:
- Added the developer-guide repository as a submodule (!751)
v4.4.2
------
**Library**
- Fix evaluation of points (e.g. HistoryPoints, Interpolation to pts) close to
the interface of two elements (!836)
- Fix deadlock in Hdf5 with homogeneous expansions (!858)
**NekMesh**
- Fix missing periodic boundary meshing and boundary layer mesh adjustment
configurations in 2D (!859)
**Documentation**:
- Fix sign of the viscous term in the velocity correction scheme equations in
the user guide (!856)
v4.4.1
------
**Library**
- Remove m_offset_elmt_id and GetOffsetElmtId which fixed problems in 2D when
- Remove m_offset_elmt_id and GetOffsetElmtId which fixed problems in 2D when
quad elements are listed before tri elements (!758)
- Remove the duplicate output of errorutil (!756)
- Fix BLAS CMake dependencies (!763)
......@@ -59,12 +89,19 @@ v4.4.1
- Fix deadlock with HDF5 input (!786)
- Fix missing entriess in LibUtilities::kPointsTypeStr (!792)
- Fix compiler warnings with CommDataType (!793)
- Fix ability to set default implementation in Collections and added an option
- Fix ability to set default implementation in Collections and added an option
to set eNoCollections in FieldConvert as default (!789)
- Fix performance issue in ProcessIsoContour in relation to memory consumption
(!821)
- Fix performance issue with ExtractPhysToBndElmt (!796)
- Fix available classes being listed multiple times (!817)
- Fix Intel compiler warnings (!837)
- Fix overwriting and backup of chk/fld files on slow file systes (!741)
- Fix DriverAdaptive with second order IMEX (!850)
- Fixed typo in eIMEXGear part (!854)
- Added regression tests for IMEXOrder1, IMEXOrder2, IMEXOrder3, MCNAB,
IMEXGear, CNAB, 2nd order IMEX-DIRK, 3rd order IMEX-DIRK (!854)
- Fix bug due to subtractive cancellation in polylib routines (!778)
**FieldConvert:**
- Fix issue with field ordering in the interppointdatatofld module (!754)
......@@ -84,13 +121,21 @@ v4.4.1
**IncNavierStokesSolver**
- Fix an initialisation issue when using an additional advective field (!779)
- Fix MovingBody boundary condition (!852)
**Utilities**
- Fix vtkToFld missing dependency which prevented compiling with VTK 7.1 (!808)
**Documentation**
- Added missing details on artificial viscosity and dealising to compressible
flow solver user guide (!846)
**Packaging**
- Added missing package for FieldUtils library (!755)
**ADRSolver:**
- Fix UnsteadyAdvectionDiffusion with DG (!855)
v4.4.0
------
**Library**:
......
......@@ -24,19 +24,28 @@ if(NOT DEFINED OCE_DIR)
# Check for OSX needs to come first because UNIX evaluates to true on OSX
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(DEFINED MACPORTS_PREFIX)
find_package(OCE 0.15 QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
find_package(OCE 0.17 QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
elseif(DEFINED HOMEBREW_PREFIX)
find_package(OCE 0.15 QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
find_package(OCE 0.17 QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
endif()
elseif(UNIX)
set(OCE_DIR "/usr/local/share/cmake/")
endif()
endif()
find_package(OCE 0.15 QUIET)
find_package(OCE 0.17 QUIET)
if(OCE_FOUND)
message(STATUS "-- OpenCASCADE Community Edition has been found.")
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
message(STATUS "OpenCASCADE Community Edition has been found.")
#check that the OCE package has CAF modules
FIND_LIBRARY(OCC_CAF_LIBRARY TKXCAF ${OCE_INCLUDE_DIRS}/../../lib )
if(OCC_CAF_LIBRARY)
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
else()
message(STATUS "-- OCE does not have CAF libraries, will build from source.")
endif()
else(OCE_FOUND) #look for OpenCASCADE
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
......@@ -45,7 +54,6 @@ else(OCE_FOUND) #look for OpenCASCADE
/usr/local/opt/opencascade/include
/opt/opencascade/include
/opt/opencascade/inc
/opt/local/include/oce
)
FIND_LIBRARY(OCC_LIBRARY TKernel
/usr/lib
......@@ -56,6 +64,7 @@ else(OCE_FOUND) #look for OpenCASCADE
)
if(OCC_LIBRARY)
message(STATUS "OpenCASCADE has been found.")
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
IF(NOT OCC_INCLUDE_DIR)
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
......@@ -112,9 +121,11 @@ if(OCC_FOUND)
TKSTEPAttr
TKHLR
TKFeat
TKXCAF
TKXDESTEP
)
if(OCC_VERSION_STRING VERSION_LESS 6.7)
if(OCC_VERSION_STRING VERSION_LESS 6.8)
MESSAGE(SEND_ERROR "OCC version too low")
endif(OCC_VERSION_STRING VERSION_LESS 6.7)
endif(OCC_VERSION_STRING VERSION_LESS 6.8)
message(STATUS "-- Found OCE/OpenCASCADE with OCC version: ${OCC_VERSION_STRING}")
endif(OCC_FOUND)
......@@ -9,6 +9,8 @@
OPTION(NEKTAR_USE_ARPACK
"Use Arpack routines for evaluating eigenvalues and eigenvectors" OFF)
SET(BUILD_ARPACK OFF)
IF (NEKTAR_USE_ARPACK)
FIND_LIBRARY(ARPACK_LIBRARY NAMES "arpack.1" "arpack" PATHS /opt/local/lib)
......@@ -16,7 +18,50 @@ IF (NEKTAR_USE_ARPACK)
MESSAGE(STATUS "Found Arpack: ${ARPACK_LIBRARY}")
MARK_AS_ADVANCED(ARPACK_LIBRARY)
ELSE()
MESSAGE(FATAL_ERROR "Could not find Arpack")
IF(CMAKE_Fortran_COMPILER)
SET(BUILD_ARPACK ON)
ELSE()
MESSAGE(FATAL_ERROR "Could not find or build Arpack")
ENDIF()
ENDIF()
ENDIF()
OPTION(THIRDPARTY_BUILD_ARPACK "Build arpack libraries from ThirdParty."
${BUILD_ARPACK})
IF(THIRDPARTY_BUILD_ARPACK)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
arpack-ng-1.0
PREFIX ${TPSRC}
URL ${TPURL}/arpack-ng.tar.gz
URL_MD5 "26cb30275d24eb79c207ed403e794736"
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/arpack-ng-1.0
BINARY_DIR ${TPBUILD}/arpack-ng-1.0
TMP_DIR ${TPBUILD}/arpack-ng-1.0-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_Fortran_COMPILER:FILEPATH=${CMAKE_Fortran_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_INSTALL_LIBDIR:PATH=${TPDIST}/lib
-DBUILD_SHARED_LIBS:STRING=ON
${TPSRC}/arpack-ng-1.0
)
SET(ARPACK_LIBRARY arpack)
LINK_DIRECTORIES(${TPDIST}/lib)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(${TPDIST}/include)
MESSAGE(STATUS "Build arpack: ${TPDIST}/${LIB_DIR}/lib${ARPACK_LIBRARY}.so")
ELSE()
ADD_CUSTOM_TARGET(arpack-ng-1.0 ALL)
ENDIF()
......@@ -22,9 +22,34 @@ IF(NEKTAR_USE_MESHGEN)
IF (THIRDPARTY_BUILD_OCE)
INCLUDE(ExternalProject)
SET(OCC_LIBRARIES_TMP PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo TKShHealing)
SET(OCC_LIBRARIES_TMP
TKFillet
TKMesh
TKernel
TKG2d
TKG3d
TKMath
TKIGES
TKSTL
TKShHealing
TKXSBase
TKBool
TKBO
TKBRep
TKTopAlgo
TKGeomAlgo
TKGeomBase
TKOffset
TKPrim
TKSTEP
TKSTEPBase
TKSTEPAttr
TKHLR
TKFeat
TKXCAF
TKXDESTEP
)
FOREACH(OCC_LIB ${OCC_LIBRARIES_TMP})
LIST(APPEND OCC_LIBRARIES ${TPDIST}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${OCC_LIB}${CMAKE_SHARED_LIBRARY_SUFFIX})
ENDFOREACH()
......@@ -51,8 +76,6 @@ IF(NEKTAR_USE_MESHGEN)
-DOCE_INSTALL_PREFIX:PATH=${TPDIST}
-DOCE_TESTING=OFF
-DOCE_VISUALISATION=OFF
-DOCE_DISABLE_X11=ON
-DOCE_OCAF=OFF
${TPSRC}/oce-0.17
)
......
......@@ -20,30 +20,57 @@ ELSE()
SET(BUILD_TINYXML ON)
ENDIF ()
OPTION(THIRDPARTY_BUILD_TINYXML
OPTION(THIRDPARTY_BUILD_TINYXML
"Build TinyXML library from ThirdParty." ${BUILD_TINYXML})
IF (THIRDPARTY_BUILD_TINYXML)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
tinyxml-2.6.2
PREFIX ${TPSRC}
URL ${TPURL}/tinyxml_2_6_2.tar.bz2
URL_MD5 240beaeb45f63b154c9801eef7561eac
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/tinyxml-2.6.2
BINARY_DIR ${TPBUILD}/tinyxml-2.6.2
TMP_DIR ${TPBUILD}/tinyxml-2.6.2-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/tinyxml-2.6.2
)
find_program(HAS_PATCH patch)
IF(HAS_PATCH)
EXTERNALPROJECT_ADD(
tinyxml-2.6.2
PREFIX ${TPSRC}
URL ${TPURL}/tinyxml_2_6_2.tar.bz2
URL_MD5 240beaeb45f63b154c9801eef7561eac
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/tinyxml-2.6.2
BINARY_DIR ${TPBUILD}/tinyxml-2.6.2
TMP_DIR ${TPBUILD}/tinyxml-2.6.2-tmp
INSTALL_DIR ${TPDIST}
PATCH_COMMAND patch -d ${TPSRC}/tinyxml-2.6.2 < ${CMAKE_SOURCE_DIR}/cmake/scripts/tinyxml.patch
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/tinyxml-2.6.2
)
ELSE()
MESSAGE(STATUS "patch utility not found, cannot apply patch to tinyxml, Nektar++ will still function")
EXTERNALPROJECT_ADD(
tinyxml-2.6.2
PREFIX ${TPSRC}
URL ${TPURL}/tinyxml_2_6_2.tar.bz2
URL_MD5 240beaeb45f63b154c9801eef7561eac
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/tinyxml-2.6.2
BINARY_DIR ${TPBUILD}/tinyxml-2.6.2
TMP_DIR ${TPBUILD}/tinyxml-2.6.2-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/tinyxml-2.6.2
)
ENDIF()
THIRDPARTY_LIBRARY(TINYXML_LIBRARY STATIC tinyxml
DESCRIPTION "TinyXML library")
......
--- tinyxmlparser.cpp 2017-10-03 16:05:35.999295200 +0100
+++ tinyxmlparser.cpp 2017-10-03 16:05:58.556565300 +0100
@@ -655,7 +655,7 @@
while ( in->good() )
{
- int tagIndex = (int) tag->length();
+ size_t tagIndex = tag->length();
while ( in->good() && in->peek() != '>' )
{
int c = in->get();
@@ -958,7 +958,7 @@
// We should be at a "<", regardless.
if ( !in->good() ) return;
assert( in->peek() == '<' );
- int tagIndex = (int) tag->length();
+ size_t tagIndex = tag->length();
bool closingTag = false;
bool firstCharFound = false;
......@@ -221,7 +221,7 @@ to screen;
\item \inltt{TInf} farfield temperature (i.e. $T_{\infty}$). Default value = 288.15 $K$;
\item \inltt{Twall} temperature at the wall when isothermal boundary
conditions are employed (i.e. $T_{w}$). Default value = 300.15$K$;
\item \inltt{uInf} farfield $X$-component of the velocity (i.e. $u_{\infty}$). Default value = 0.1 $m/s$;
\item \inltt{uint} farfield $X$-component of the velocity (i.e. $u_{\infty}$). Default value = 0.1 $m/s$;
\item \inltt{vInf} farfield $Y$-component of the velocity (i.e. $v_{\infty}$). Default value = 0.0 $m/s$;
\item \inltt{wInf} farfield $Z$-component of the velocity (i.e. $w_{\infty}$). Default value = 0.0 $m/s$;
\item \inltt{mu} dynamic viscosity (i.e. $\mu_{\infty}$). Default value = 1.78e-05 $Pa s$;
......@@ -437,7 +437,6 @@ Compressible flow is characterised by abrupt changes in density within the flow
\begin{equation}\label{eq:sensor}
S_e=\frac{||\rho^p_e-\rho^{p-1}_e||_{L_2}}{||\rho_e^p||_{L_2}}
\end{equation}
by default the comparison is made with the $p-1$ solution, but this can be changed by setting the parameter \inltt{SensorOffset}.
An artificial diffusion term is introduced locally to the Euler equations to deal with flow discontinuity and the consequential numerical oscillations. Two models are implemented, a non-smooth and a smooth artificial viscosity model.
\subsubsection{Non-smooth artificial viscosity model}
For the non-smooth artificial viscosity model the added artificial viscosity is constant in each element and discontinuous between the elements. The Euler system is augmented by an added laplacian term on right hand side of equation \ref{eq:euler}. The diffusivity of the system is controlled by a variable viscosity coefficient $\epsilon$. The value of $\epsilon$ is dependent on $\epsilon_0$, which is the maximum viscosity that is dependent on the polynomial order ($p$), the mesh size ($h$) and the maximum wave speed and the local sensor value. Based on pre-defined sensor threshold values, the variable viscosity is set accordingly
......@@ -450,6 +449,24 @@ For the non-smooth artificial viscosity model the added artificial viscosity is
\end{array}
\right.
\end{equation}
To enable the non-smooth viscosity model, the following line has to be added to the \inltt{SOLVERINFO} section:
\begin{lstlisting}[style=XmlStyle]
<SOLVERINFO>
<I PROPERTY="ShockCaptureType" VALUE="NonSmooth" />
<SOLVERINFO>
\end{lstlisting}
The diffusivity is controlled by the following parameters:
\begin{lstlisting}[style=XmlStyle]
<PARAMETERS>
<P> Skappa = -1.3 </P>
<P> Kappa = 0.2 </P>
<P> mu0 = 1.0 </P>
</PARAMETERS>
\end{lstlisting}
where mu0 is the maximum values for the viscosity coefficient,
Kappa is half of the width of the transition interval and Skappa is
the value of the centre of the interval.
\begin{figure}[!htbp]
\begin{center}
\includegraphics[width = 0.47 \textwidth]{img/Mach_P4.pdf}
......@@ -458,6 +475,7 @@ For the non-smooth artificial viscosity model the added artificial viscosity is
\label{fig:}
\end{center}
\end{figure}
\subsubsection{Smooth artificial viscosity model}
For the smooth artificial viscosity model an extra PDE for the artificial viscosity is appended to the Euler system
\begin{equation}\label{eq:eulerplusvis}\begin{split}
......@@ -512,54 +530,52 @@ The polynomial order in each element can be adjusted based on the sensor value t
\right.
\end{equation}
For now, the threshold values $s_e$, $s_{ds}$, $s_{sm}$ and $s_{fl}$ are determined empirically by looking at the sensor distribution in the domain. Once these values are set, two .txt files are outputted, one that has the composites called VariablePComposites.txt and one with the expansions called VariablePExpansions.txt. These values have to copied into a new .xml file to create the adapted mesh.
\subsection{De-Aliasing Techniques}
Aliasing effects, arising as a consequence of the nonlinearity of the
underlying problem, need to be address to stabilise the simulations. Aliasing
appears when nonlinear quantities are calculated at an insufficient number of
quadrature points. We can identify two types of nonlinearities:
\begin{itemize}
\item PDE nonlinearities, related to the nonlinear and quasi-linear fluxes.
\item Geometrical nonlinearities, related to the deformed/curves meshes.
\end{itemize}
We consider two de-aliasing strategies based on the concept of consistent integration:
\subsection{Quasi-1D nozzle flow}
A quasi-1D inviscid flow (flow with area variation) can be obtained using the
\inltt{Quasi1D} forcing in a 1D solution of the Euler equations:
\begin{lstlisting}[style=XMLStyle]
<FORCING>
<FORCE TYPE="Quasi1D">
<AREAFCN> Area </AREAFCN>
</FORCE>
</FORCING>
\end{lstlisting}
in this case a function named \inltt{Area} must be specified in the \inltt{CONDITIONS} section of the session file.
\begin{itemize}
\item Local dealiasing: It only targets the PDE-aliasing sources, applying a consistent integration of them locally.
\item Global dealiasing: It targets both the PDE and the geometrical-aliasing sources. It requires a richer quadrature order to consistently integrate the nonlinear fluxes, the geometric factors, the mass matrix and the boundary term.
\end{itemize}
In this case, it is possible to prescribe the inflow conditions in terms of stagnation properties (density and pressure)
by using the following boundary condition
\begin{lstlisting}[style=XmlStyle]
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="StagnationInflow" VALUE="rhoStag" />
<D VAR="rhou" USERDEFINEDTYPE="StagnationInflow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="StagnationInflow" VALUE="pStag/(Gamma-1)" />
</REGION>
</BOUNDARYCONDITIONS>
\end{lstlisting}
Since Nektar++ tackles separately the PDE and geometric aliasing during the
projection and solution of the equations, to consistently
integrate all the nonlinearities in the compressible
NavierStokes equations, the quadrature points should
be selected based on the maximum order of the nonlinearities:
\begin{equation}
Q_{min}= P_{exp}+\frac{max(2P_{exp},P_{geom})}{2} + \frac{3}{2}
\end{equation}
\subsection{Axi-symmetric flow}
An axi-symmetric inviscid flow (with symmetry axis on x=0) can be obtained using
the \inltt{AxiSymmetric} forcing in a 2D solution of the Euler equations:
\begin{lstlisting}[style=XMLStyle]
<FORCING>
<FORCE TYPE="AxiSymmetric">
</FORCE>
</FORCING>
\end{lstlisting}
The \inltt{StagnationInflow} boundary condition can also be used in this case.
where $Q_{min}$ is the minimum required number of quadrature
points to exactly integrate the highest-degree of nonlinearity,
$P_{exp}$ being the order of the polynomial expansion and $P_{geom}$
being the geometric order of the mesh. Bear in mind thatwe are
using a discontinuous discretisation, meaning that aliasing
effect are not fully controlled, since the boundary terms
introduce non-polynomial functions into the problem.
To enable the global de-aliasing technique, modify the number of quadrature
points by:
Also, by defining the geometry with \inltt{<GEOMETRY DIM="2" SPACE="3">} (i.e. a two-dimensional
mesh in three-dimensional space) and adding the \inltt{rhow} variable, we obtain an axi-symmetric
flow with swirl, in which case the \inltt{StagnationInflow} boundary condition allows prescribing \inltt{rhow}:
\begin{lstlisting}[style=XmlStyle]
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="StagnationInflow" VALUE="rhoStag" />
<D VAR="rhou" USERDEFINEDTYPE="StagnationInflow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="StagnationInflow" VALUE="0" />
<D VAR="rhow" USERDEFINEDTYPE="StagnationInflow" VALUE="x" />
<D VAR="E" USERDEFINEDTYPE="StagnationInflow" VALUE="pStag/(Gamma-1)" />
</REGION>
</BOUNDARYCONDITIONS>
<E COMPOSITE="[101]"
BASISTYPE="Modified_A,Modified_A"
NUMMODES="7,7"
POINTSTYPE="GaussLobattoLegendre,GaussLobattoLegendre"
NUMPOINTS="14,14"
FIELDS="rho,rhou,rhov,E"
/>
\end{lstlisting}
where \inltt{NUMMODES} corresponds to $P$+1, where $P$ is the order of the polynomial
used to approximate the solution. \inltt{NUMPOINTS} specifies the number of quadrature
points.
......@@ -66,7 +66,7 @@ zero. If we now integrate the 1st, 2nd and last term in equation
(\ref{eqn.weakp}) by parts we can obtain the weak pressure equation
\begin{align}
\int_{\Omega} \nabla q \cdot \nabla p^{n+1} &= \int_{\Omega} q\, \nabla \cdot \left ( \frac{\partial \mathbf{u}}{\partial t}^{n+1} + \mathbf{N}(\mathbf{u})^{n+1} \right ) \nonumber \\
&- \int_{\partial \Omega} q \left ( \frac{\partial \mathbf{u}}{\partial t}^{n+1} + \mathbf{N}(\mathbf{u})^{n+1} - \nu \nabla \times \nabla \times \mathbf{u}^{n+1} \right ) \cdot \mathbf{n}
&- \int_{\partial \Omega} q \left ( \frac{\partial \mathbf{u}}{\partial t}^{n+1} + \mathbf{N}(\mathbf{u})^{n+1} + \nu \nabla \times \nabla \times \mathbf{u}^{n+1} \right ) \cdot \mathbf{n}
\label{eqn.weakp1}
\end{align}
where $\partial \Omega$ is the boundary of the domain and we have used
......@@ -98,7 +98,7 @@ which to decouple the system we impose that $\nabla \cdot
\int_{\Omega} \nabla q \cdot \nabla p^{n+1} &=
\int_{\Omega} q \, \nabla \cdot \left (-\frac{\hat{\mathbf{u}}}{\Delta t}
+ \mathbf{N}(\mathbf{u})^{*,n+1} \right ) \nonumber \\
&- \int_{\partial \Omega} q \left ( \frac{\partial \mathbf{u}}{\partial t}^{n+1} + \mathbf{N}(\mathbf{u})^{*.n+1} - \nu (\nabla \times \nabla \times \mathbf{u})^{*,n+1} \right ) \cdot \mathbf{n}
&- \int_{\partial \Omega} q \left ( \frac{\partial \mathbf{u}}{\partial t}^{n+1} + \mathbf{N}(\mathbf{u})^{*.n+1} + \nu (\nabla \times \nabla \times \mathbf{u})^{*,n+1} \right ) \cdot \mathbf{n}
\label{eqn.weakpfinal}
\end{align}
We note this can be recast into an equivalent strong form of the
......@@ -109,7 +109,7 @@ which to decouple the system we impose that $\nabla \cdot
\end{equation}
with consistent Neumann boundary conditions prescribed as
\begin{equation}
\frac{\partial p}{\partial n}^{n+1}= - \Bigl[ \frac{\partial \mathbf{u}}{\partial t}^{n+1} - \nu (\nabla \times \nabla \times \mathbf{u})^{*,n+1} + \mathbf{N}^{*,n+1}\Bigr]\cdot \mathbf{n}
\frac{\partial p}{\partial n}^{n+1}= - \Bigl[ \frac{\partial \mathbf{u}}{\partial t}^{n+1} + \nu (\nabla \times \nabla \times \mathbf{u})^{*,n+1} + \mathbf{N}^{*,n+1}\Bigr]\cdot \mathbf{n}
\label{eqn.pressurebcs}
\end{equation}
......
......@@ -24,9 +24,17 @@ This force type allows the user to apply an absorption layer (essentially a poro
<COEFF> [FUNCTION NAME] <COEFF/>
<REFFLOW> [FUNCTION NAME] <REFFLOW/>
<REFFLOWTIME> [FUNCTION NAME] <REFFLOWTIME/>
<BOUNDARYREGIONS> 1,4 <BOUNDARYREGIONS/>
</FORCE>
\end{lstlisting}
If a list of \inltt{BOUNDARYREGIONS} is specified, the distance to these regions is available as additional variable \inltt{r} in the definition of the \inltt{COEFF} function:
\begin{lstlisting}[style=XMLStyle]
<FUNCTION NAME="AbsorptionCoefficient">
<E VAR="p" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
<E VAR="u" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
<E VAR="v" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
</FUNCTION>
\end{lstlisting}
\subsection{Body}
This force type specifies the name of a body forcing function expressed in the \inltt{CONDITIONS} section.
......
......@@ -36,6 +36,8 @@
#include <SpatialDomains/GeomFactors.h>
#include <Collections/CoalescedGeomData.h>
#include <LocalRegions/Expansion.h>
using namespace std;
namespace Nektar {
......@@ -73,11 +75,12 @@ const Array<OneD, const NekDouble> &CoalescedGeomData::GetJac(
int cnt = 0;
for(int i = 0; i < nElmts; ++i)
{
const Array<OneD, const NekDouble> jac =
pCollExp[i]->GetMetricInfo()->GetJac(ptsKeys);
const StdRegions::StdExpansion * sep = &(*pCollExp[i]);
const LocalRegions::Expansion * lep = dynamic_cast<const LocalRegions::Expansion*>( sep );
const Array<OneD, const NekDouble> jac = lep->GetMetricInfo()->GetJac( ptsKeys );
if (pCollExp[i]->GetMetricInfo()->GetGtype() ==
SpatialDomains::eDeformed)
if( lep->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed )
{
Vmath::Vcopy(npts, &jac[0], 1, &newjac[cnt], 1);
}
......@@ -119,11 +122,12 @@ const Array<OneD, const NekDouble> &CoalescedGeomData::GetJacWithStdWeights(
int cnt = 0;
for(int i = 0; i < nElmts; ++i)
{
const Array<OneD, const NekDouble> jac =
pCollExp[i]->GetMetricInfo()->GetJac(ptsKeys);
const StdRegions::StdExpansion * sep = &(*pCollExp[i]);
const LocalRegions::Expansion * lep = dynamic_cast<const LocalRegions::Expansion*>( sep );
const Array<OneD, const NekDouble> jac = lep->GetMetricInfo()->GetJac(ptsKeys);
if (pCollExp[i]->GetMetricInfo()->GetGtype() ==
SpatialDomains::eDeformed)
if( lep->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed )
{
Vmath::Vcopy(npts, &jac[0], 1, &newjac[cnt], 1);
}
......@@ -169,11 +173,12 @@ const Array<TwoD, const NekDouble> &CoalescedGeomData::GetDerivFactors(
int cnt = 0;
for(int i = 0; i < nElmts; ++i)
{
const Array<TwoD, const NekDouble> Dfac =
pCollExp[i]->GetMetricInfo()->GetDerivFactors(ptsKeys);
const StdRegions::StdExpansion * sep = &(*pCollExp[i]);
const LocalRegions::Expansion * lep = dynamic_cast<const LocalRegions::Expansion*>( sep );
const Array<TwoD, const NekDouble> Dfac = lep->GetMetricInfo()->GetDerivFactors( ptsKeys );
if (pCollExp[i]->GetMetricInfo()->GetGtype() ==
SpatialDomains::eDeformed)
if( lep->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed)
{
for (int j = 0; j < dim*coordim; ++j)
{
......
......@@ -21,3 +21,11 @@ ADD_NEKTAR_TEST(NodalDemo_Prism_Interp_P7)
ADD_NEKTAR_TEST(NodalDemo_Tet_Deriv_P8)
ADD_NEKTAR_TEST(NodalDemo_Tet_Integral_P6)
ADD_NEKTAR_TEST(NodalDemo_Tet_Interp_P7)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXGear)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXOrder1)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXOrder2)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXOrder3)
ADD_NEKTAR_TEST(TimeIntegrationDemoDIRKIMEXOrder2)
ADD_NEKTAR_TEST(TimeIntegrationDemoDIRKIMEXOrder3)
ADD_NEKTAR_TEST(TimeIntegrationDemoCNAB)
ADD_NEKTAR_TEST(TimeIntegrationDemoMCNAB)
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.10135</value>
</metric>