text:
\section{Introduction}
While hydropower has been the major resource for generating electricity from water, marine and hydrokinetic (MHK) systems can harness energy from flowing natural streams of water without needing dams for impounding water \citep{khan2009hydrokinetic}.
Instead, they make use of MHK devices to extract energy from rivers, tidal channels, and ocean currents.
Axial hydrokinetic turbines are a popular choice of device to extract MHK energy
and have been deployed in the field \citep{torrens2017assessment, williamson2016self, web:openei-axial-1} as well as studied analytically, experimentally and computationally \citep{nishino2012efficiency, batten2008prediction, gant2008modelling, kang2012reallife, kang2014onset, malki2014planning, chawdhary2017wake, angeloudis2018optimising}.

Despite the recent advances in numerical methods and the exponential growth of computing power, numerical study of MHK turbine arrays at field-scale rivers remains a major challenge.
Marine environments are dominated by complex bathymetry and a wide range of natural and man-made structures that give rise to turbulent flows dominated by energetic, large-scale coherent structures. Introducing MHK devices in such a complex fluid flow environment gives rise to additional complexities in the turbulent flow due to turbine-turbine and turbine-bathymetry interactions, which give rise to flow phenomena spanning a broad range of temporal and spatial scales. Such phenomena need to be understood and quantified in order to optimize MHK arrays for energy extraction and evaluate the structural integrity and reliability of the devices in the harsh waterway fluvial environment \citep{li2011integrated, kang2012numerical,tatum2016wave,musa2018performance}.
Computational modeling presents the only viable approach for gaining such understanding at field scale and on a site-specific basis.

Computational tools capable of tackling such complex flows, however, need to be able to resolve waterway and device induced turbulence, which occurs at high Reynolds numbers, across a range of scales, and is dominated by inherently 3D energetic coherent structures.
For the most part, field-scale simulations of large rivers have been performed using two-dimensional (2D) models by solving the shallow-water equations \citep{abderrezzak2009modelling, casulli2000unstructured, heniche2000two, yoon2004finite, lee2017development} or statistically stationary 3D models based on the Reynolds-averaged Navier-Stokes (RANS) equations \citep{ge20053d,nagata2005three,lu20093d,baranya2015flow}, due to their simplicity and computational expedience.
Computational methods for carrying out eddy-resolving simulations in real-life rivers have only recently began to appear in the literature \citep{kang2015numerical, khosronejad2016high, khosronejad2016large, wilcox2017simulation}. Such models, however, have yet to tackle the simulation of MHK devices in real-life river environments.

\citet{james2010simulating} used a modification of the Environmental Fluid Dynamics Code (EFDC) \citep{hamrick2007environmental} developed at Sandia National Laboratories (SNL) to simulate changes in the marine environment caused by an array of MHK turbines, by modeling MHK turbines as single energy extraction points in a 2D domain.
Other previous studies have used unsteady Reynolds-Averaged Navier Stokes (RANS) modeling to simulate flows in idealized channel geometries with actuator disc model to model the turbines, but without accounting for the prevailing features of the surrounding marine environment \citep{bai2009investigation, abolghasemi2016simulating}.
LES has been widely applied as a powerful computational tool in the highly relevant field of wind farm optimization \citep{churchfield2012large, yang2013large, porte2013numerical, vasel2017wind, yang2018large}. Conclusions from such studies, however, are of limited use for MHK energy systems due to inherent differences between the ambient atmospheric flow in wind farms (e.g. the size of the wind turbine relative to the thickness of the atmospheric boundary layer) and the fully developed turbulence in waterways (where the MHK turbines occupy a considerable part of the flow depth) \citep{chamorro2013three}. \citet{churchfield2013large} are developing a framework for simulating MHK turbine arrays in natural waterways \citep{churchfield2013large}
and have applied it to study the effects of turbulence in the incoming flow on the wake characteristics in an artificial straight channel using LES and actuator disk parameterization.
\citet{wilcox2017simulation} performed site-specific detached-eddy simulation (DES) of turbulent flow in the Fundy Tidal Region at field scale to gain insight about the placement of tidal turbines. However, the simulations with turbines was planned for future work.

Sotiropoulos and co-workers have recently developed an advanced computational fluid dynamics framework, the Virtual Flow Simulator (VFS-Rivers), capable of carrying out site-specific LES in real-life waterways with stationary and/or mobile river beds \citep{sotiropoulos2015hydraulics}. VFS-Rivers employs the curvilinear immersed boundary (CURVIB) method \citep{ge2007numerical, kang2011high} with wall models for carrying out LES in arbitrarily complex domains with arbitrarily complex immersed boundaries and migrating bedforms. The predictive capabilities of VFS-Rivers have been extensively demonstrated for flows in man-made field scale streams \cite{kang2011high}, natural streams \citep{khosronejad2016large}, and large rivers under baseline and extreme flooding conditions \cite{khosronejad2016high}. VFS-Rivers has also been applied to carry out high-fidelity LES of a single MHK turbine \citep{kang2012reallife, kang2014onset} and MHK turbines in a TriFrame arrangement \citep{chawdhary2017wake} in a laboratory straight open channel. In all cases, excellent agreement with laboratory and field-scale (where available) measurements have been reported and the ability of the code to uncover new physics that could not be accessed by experiments alone has been demonstrated (see for example \citet{kang2014onset}).

 \begin{figure}[htp]
  \center
  \includegraphics[width=5.7in, keepaspectratio=true]{Scales-in-hydro-modelling.png}
  \caption{Schematic showing the range of length scales present in hydrodynamic modeling of MHK energy systems at different physical dimensions involved. (Adapted from \citet{adcock2015tidal}). The simulation in this paper resolves flow scales across multiple ranges, as marked in red.}
  \label{fig:scales-plot}
\end{figure}

In spite of the aforementioned recent progress, high-fidelity computational methods that can carry out LES of MHK turbines and multi-turbine arrays in real-life waterways, resolving waterway and device-induced unsteady coherent structures, have yet to be proposed in the literature. The reason for this is illustrated in Fig. \ref{fig:scales-plot}, which describes the various length scales present in the flow when a turbine is placed in a natural marine environment like a tidal channel. The blades of the turbine can be very thin giving rise to small scale flow structures (of the order of centimeters) whereas the turbine diameter itself is normally of the order of few meters. A multi-turbine array introduces flow scales which, depending on the array configuration, can be beyond an order of magnitude larger than the turbine diameter. Furthermore, when modeling a particular array installation site or a larger marine environment, the flow characteristics of the region (river and/or ocean system) also come into play as they determine the ambient and inflow conditions to the turbine array.
As recent as few years ago, \citet{stoesser2010calculation} noted that ``because of the
 high computational cost, LES can currently only be used for lower Reynolds numbers
 making it not directly applicable in the river engineering practice where usually Reynolds numbers are above $10^6$ and computational domains sizes range from several hundred meters  to kilometers''.
Other researchers have also acknowledged the computational challenges in dealing with natural geometries \citep{abad2008flow, kang2012numerical}.
\citet{kang2012reallife, kang2014onset, gant2008modelling, batten2008prediction, malki2014planning} and \citet{chawdhary2017wake} have studied flow past turbines using LES to resolve scales in one or two of the scale ranges shown in Fig. \ref{fig:scales-plot}.

In this work we seek to demonstrate for the first time that LES of multi-turbine MHK farms in real-life waterways resolving coherent structures spanning the scales of the river to the scale of the turbine rotor and wake are now well within reach. For that, we implement a recently developed numerical method capable of local mesh refinement on unstructured Cartesian grids \citep{angelidis2016unstructured} in the new version of the VFS-Rivers code to enable multi-resolution simulations of MHK arrays in a real-life waterway. The specific case we consider herein is the Roosevelt Island Tidal Energy (RITE) project currently under development in the East River in New York City by Verdant Power. We employ high-resolution bathymetry measurements and the turbine layout proposed by Verdant Power to reconstruct a virtual model of the East River tidal power plant. The resulting digital model of the East River power plant is embedded in a background Cartesian mesh locally refined in the vicinity of the turbines to carry out LES at field scale using the method developed by \citet{angelidis2016unstructured}.
Our work makes a number of novel contributions to the literature by: a) Demonstrating the potential of the geometry-based adaptive mesh refinement methodology in performing high-fidelity, multi-resolution LES for real life aquatic environments; b) Bridging computationally for the first time the large disparity of scales between the coherent structures induced by the energy harvesting device and those induced by the waterway within which the devices are embedded in so that turbine-turbine and turbine-waterway interactions can be studied numerically at field scale and c) illustrating the utility of site-specific LES as a powerful tool for enabling simulation-based optimization of MHK powerplants at field scale.

This paper is organized as follows. In section \ref{sec:method}, we briefly discuss the numerical method used for the simulations. In section \ref{sec:validation}, we validate the numerical method by simulating a model wind farm and comparing simulations with measurements. Section \ref{sec:eastriverSetup} describes the deployment site of the hydrokinetic turbine array simulated herein. Section \ref{sec:baseline} presents results from baseline simulations of the relevant reach of the East River without the turbine array. Section \ref{sec:array-simulation} presents simulation results for the 30 turbine array installed in the East River and discusses its effects on the river flowfield. Finally, in section \ref{sec:conclusion} we summarize the findings of this work and discuss future directions.

\section{Numerical Methods}
\label{sec:method}
The new version of VFS-Rivers, incorporating the unstructured Cartesian flow solver of \citet{angelidis2016unstructured}, is employed herein to perform multi-resolution LES past the RITE turbine array.
The equations governing the instantaneous, resolved flow field for three-dimensional, incompressible, turbulent flow are the spatially-filtered continuity and Navier-Stokes equations employed in LES models. The sub-grid scale (SGS) stress tensor representing the effects of the SGS motions on the resolved fields of the LES is modeled using the Smagorinsky model \citep{smagorinsky1963general}. The governing equations are discretized on a $3D$ hybrid staggered/non-staggered grid layout \citep{Ge20071782} adapted on unstructured Cartesian grids using the second-order central differencing scheme when stencil cells are at same level of refinement.
When computational cells are surrounded by other cells of varying level of refinement, hanging nodes and a bi-quadratic operator  are utilized to facilitate the spatial discretization using a hybrid second-order upwind scheme.
Time integration of governing equations is performed using the fractional step algorithm such that the discrete divergence of the velocity field is satisfied to machine zero at every time step.
The implicit solution of the momentum equation is achieved by using a Jacobian-free Newton-Krylov method coupled with the generalized minimal residual solver (GMRES) of \citet{saad1986gmres}.
The unstructured flow solver is efficiently parallelized using the portable, extensible toolkit for scientific computation (PETSc) libraries and message passing interface (MPI) \citep{petsc-efficient, petsc-web-page, petsc-user-ref}. The PETSc libraries are also used to solve the momentum equation using the aforementioned Jacobian-free Newton-Krylov method. The high performance preconditioners (HYPRE) libraries \citep{falgout2006numerical} with BoomerAMG \citep{yang2002boomeramg} preconditioner are used for solving the Poisson equation.
We use the actuator line model for modeling the axial turbines in the flow where the blades of turbines are represented using rotating line forces in the flow \citep{angelidis2016unstructured, yang2015large}.
The sharp interface immersed boundary method approach in VFS-Rivers is employed to simulate arbitrarily complex immersed boundary in the flow domain -- the river bathymetry in this case. In this method, the immersed irregular structures are represented using unstructured triangulated surface meshes embedded within a locally refined Cartesian background grid.
The effect of immersed boundaries on the flow (i.e. the river bathymetry in this case) is accounted for by reconstructing at every time step boundary conditions at the nodes in the immediate vicinity of the boundary via interpolation along the local normal to the boundary direction. Given the high Reynolds number of the flows of interest, the interpolation to reconstruct velocity boundary conditions is implemented using a wall model (see \citet{yang2012computationalWT} for details).
The freesurface boundary of the flow channel is treated as a rigid lid, an assumption which has been successfully applied in the previous works of \citet{kang2011high, kang2012reallife, kang2014onset} and \citet{yangtoward} among others, for low Froude number flows ($Fr \approx 0.2$ for the flow in the East River).
More details about numerical method can be found in \citet{angelidis2016unstructured}.

\section{Model validation : Flow over aligned wind turbine array}
\label{sec:validation}
In \citet{angelidis2016unstructured} we validated the unstructured Cartesian flow solver for several cases including turbulent flows over stand-alone wind and hydrokinetic turbines.
In this section we seek to demonstrate the predictive ability of the solver in LES of turbine arrays. Since no data is available for MHK arrays, we employ herein the results of a well documented wind tunnel experiment for a model wind farm.

\subsection{Test case and computational details}
We carry out LES of turbulent flow past a 6$\times$3 aligned array of model wind turbines spaced $5D$ and $4D$ apart of each other in the streamwise (z) and spanwise (x) directions, respectively. Each model wind turbine has diameter $D=0.15m$ and hub height $h=5D/6$. The tip-speed ratio (TSR), $\lambda$, for all the turbines is $\lambda=4.1$ and the Reynolds number, $Re$, based on the rotor diameter, $D$, and the mean incoming hub height velocity, $W_h$, is $Re=2.5\times10^4$.
Details of the corresponding wind tunnel experiment can be found in the work of \citet{chamorro2011turbulent_b}. We note that the same test case has also been investigated numerically by \citet{yang2013large} using the Virtual Flow Simulator (VFS) \citep{VFS} to carry out LES on a structured Cartesian grid without refinement.

The computational domain extends 12$D$, 5$D$ and 33$D$ in the spanwise ($x$), vertical ($y$) and streamwise ($z$) directions, respectively. Two simulations are carried out, the first is performed on a uniform structured Cartesian grid (G1) with $N_x$=121, $N_y$=61 and $N_z$=331 gridnodes in $x$, $y$ and $z$ directions, respectively, and the second is performed on a locally refined mesh (G2) which is generated after remeshing the primary structured Cartesian grid (G1) in a cylindrical manner around the mid-column rotors, by applying up to two levels of refinement. Thus, G1 consists of $2.4\times10^6$ cells, and the resulting grid spacing around all the turbine rotors is $D/10$, $D/12$ and $D/10$ in $x$, $y$ and $z$ directions, respectively. To generate the unstructured grid G2, we apply two levels of refinement around the mid-column wind turbines in a cylindrical manner and the center of the finite cylinders is located at the turbines' hub height. The first level of refinement is located within a cylindrical region with a radius of $R_{ref1}=0.7D$ which extends between $0.8D\le z \le32D$ from the inlet and the second level of refinement is applied within six cylindrical zones with a radius of $R_{ref2}=0.6D$ and length of $L_{ref2}=2D$ located symmetrically around the turbine rotors.
The equivalent uniform structured Cartesian grid having the resolution same as that around the turbine rotors, would consist of $1.5 \times 10^8$ computational cells.
The resolution  around the turbine rotors of the middle column in G2 is equivalent to the finest spatial discretization used in the work of \citet{yang2013large} using a stretched Cartesian structured grid with $17.3 \times 10^6 $ cells.
To generate inflow conditions, we carry out LES for a domain of the same cross-section as the computational domain with the turbines but without the turbines and with periodic conditions applied in the streamwise direction. This simulation is continued until statistical convergence is achieved. Instantaneous flowfields from the statistically stationary flowfields are stored and subsequently used to prescribe instantaneous boundary conditions at the inlet of the wind farm domain.
Free slip conditions are applied at the top and spanwise boundaries and the wall model of \citet{1063/1.1476668} is used as boundary condition on the bottom boundary.
The turbines are parameterized using the actuator line model as described in \citet{yang2015large}.
The time step is equal to $\tau=0.001D/W_h$. The simulations are first run for 25 revolutions of the turbines until the total kinetic energy of the domain reaches a quasi-steady state. Subsequently, the results are time averaged for another 55 rotor revolutions to compute the statistics presented below.

\subsection{Comparison with experimental measurements and numerical data}
Streamwise profiles of the calculated (with and without refinement) time-averaged streamwise velocity (W) are compared with the measurements of \citet{chamorro2011turbulent_b} and the LES of \citet{yang2013large} at different vertical locations on a $x$-$z$ plane passing through the center of the middle column wind turbines in Fig. \ref{stremwiseveldistr}. At the bottom tip of the wind turbines (Fig. \ref{stremwiseveldistr}(a)), the present calculations agree well with the experimental measurements with a small over-prediction of the time-averaged streamwise velocity observed in the wake of the first and second wind turbines. Our results are in very good agreement with the experimental measurements in the wake of the fourth, fifth and sixth wind turbines where the calculations of \citet{yang2013large} slightly under-predict the streamwise velocity. Overall the calculations performed on a 2-level locally refined grid agree very well with the experimental measurements. It is seen in Fig. \ref{stremwiseveldistr}(b) that the calculations performed on a locally refined grid, G2, result in better prediction of the near-wake time-averaged streamwise velocity compared to calculations performed on the primary grid G1 and calculations on stretched Cartesian grids \citep{yang2013large}. At the top tip of the wind turbines (Fig. \ref{stremwiseveldistr}(c)), small discrepancies are observed mostly in the wake of the first wind turbine; however, very good agreement is obtained for all the other locations. The maximum discrepancy found 1D downstream of the first turbine is approximately 10\%. The maximum discrepancy in the wake of the rest of the turbines at hub height is less than 5\% (at a location approximately 1D downstream of the second turbine).

Figure \ref{Fig_time_averaged_contours_2} shows contours of the mean velocity and turbulence statistics along the vertical plane passing through the center of the wind farm. In line with the observations of \citet{yang2013large}, the velocity deficit in the wake of the first wind turbine is much weaker compared to the wakes of the other turbines which are nearly the same (Fig. \ref{Fig_time_averaged_contours_2}(a)). The actuator line model can also predict the significant levels of time-averaged spanwise velocity induced by the rotating turbines; which is more intense in the wake of the first and second turbines (Fig. \ref{Fig_time_averaged_contours_2}(b)). The distribution of the time-averaged velocity profiles provides evidence of the smooth transition of the flow properties across cells with different levels of refinement \citep{angelidis2016unstructured}. Figure \ref{Fig_time_averaged_contours_2}(c) depicts contours of the streamwise turbulence intensity computed on a 2-level refined grid. The velocity fluctuations in the wake and at the top tip of the wind turbines result in the formation of a layer of enhanced turbulence intensity, which transitions to higher levels with downwind distance.
The turbulence intensity is larger at the top tip compared to the bottom tip shear layer as a result of the interaction of the turbine wakes with the wall boundary layer. We may also observe the development of a region with significant turbulence intensity just behind the turbines at the hub height. Figure \ref{Fig_time_averaged_contours_2}(d) shows the contour plots of Reynolds shear stress, $-<v'w'>$, normalized by the incoming hub height velocity, $W_h$. The turbines introduce positive kinematic shear stress in the wakes at the top-tip and negative stress below the turbine hub height, respectively. The absolute kinematic shear stress at the top tip height is significantly larger compared to the values in lower regions, indicating that the high levels of vertical flux of streamwise momentum are associated with the intense shear layer. Overall, the results presented in this section show that our calculations are in good agreement with the experimental measurements of \citet{chamorro2011turbulent_b}. The discretization of the governing equations on a locally refined unstructured Cartesian grid enabled achievement of comparable level of accuracy with the calculations of \citet{yang2013large} while using 5 times smaller number of computational cells.
\begin{figure}[!t]
  \centering
  \includegraphics[width=0.75\linewidth]{W_average_comparison_Legend}
  \caption{
Comparison of the mean streamwise wind velocity at different vertical locations, along the streamwise direction, on a $x$-$z$ plane passing through the center of the middle column wind turbines. Calculations performed on a uniform Cartesian grid $121\times61\times331$ without refinement (G1) and on a 2-level refined grid adapted around and in the wake of the wind turbines' rotor (G2). Comparison is performed against previous experimental measurements of \citet{chamorro2011turbulent_b} and numerical simulations of \citet{yang2013large}.
  }
  \label{stremwiseveldistr}
\end{figure}
\begin{figure}[!b]
\centering
\includegraphics[width=\textwidth]{Fig_time_averaged_contours_2}
\caption{
Contours of the time-averaged: (a) streamwise wind velocity; (b) spanwise wind velocity; (c) streamwise turbulence intensity; (d) Reynolds shear stress, on a $y$-$z$ plane passing through the center of the wind turbines located in the middle column. The plotted values are normalized by the incoming hub height velocity, $W_h$, and the calculations are performed on a 2-level refined grid consisted of $3.6\times10^6$ computational cells.
}
\label{Fig_time_averaged_contours_2}
\end{figure}

\section{The East River site and computational setup}
\label{sec:eastriverSetup}
The East River is a tidal strait in New York City that connects New York Harbor and the Atlantic Ocean to Long Island Sound. An aerial view of New York City in Fig. \ref{fig:ManhattanEastRiver}(a) shows its location between Manhattan and Queens.
The present study is part of the RITE Project, a pilot project which aims to install up to one Megawatt of MHK power in the East Channel of the East River.
The Federal Energy Regulatory Commission (FERC) has issued a commercial pilot license (\#P-12611) to \textit{Verdant Power}. The region where MHK turbine array is proposed to be installed is indicated in Fig. \ref{fig:ManhattanEastRiver}(c).
The East River being a tidal strait starts and ends in ocean and the flow is driven by the difference in tidal heights with a semi-diurnal time period of about 12 hours.
In spite of the varying nature of the flow, it is possible to treat the flow as unidirectional for the purpose of our study for the following reasons:
(1) the time scale (12 hours) of flow pulsation is much larger than the time taken for the hydrodynamics within the simulated section to attain a statistically converged steady state -- the simulations were run for a total physical time of $~900\,s$;
and (2) the turbines in the flow are allowed to yaw so that they are approximately aligned with the primary flow direction.
The tidal channel bed is a cobble layer of rocks larger than the size that can be mobilized by the flow eliminating the need for sediment transport modeling.

\subsection{Deployment of the Triframes in East River}
The map in Fig. \ref{fig:ManhattanEastRiver}(c) shows the FERC licensed boundary within which the turbines are to be installed.
Verdant Power has developed Kinetic Hydro-Power System (KHPS) turbines that will be used to harvest kinetic energy from the channel. These are 3-blade axial turbines $5\,m$ in diameter.
The power generation capacity of these machines, which naturally varies with time as a function of the instantaneous water flow velocity, is $56\;kW$ and their rated power in the RITE site flow velocity distribution is $35\,kW$ \citep{vpireportv2}.
Verdant Power has successfully performed deployment of individual turbines at the site.
The proposed plan is to deploy up to 30 turbines in the East Channel of the East River in several phases with constant testing and environmental monitoring.
For structural reasons and ease of deployment the turbines are to be installed on the river bed in 10 TriFrame arrangements -- i.e. sets of three turbines mounted on the apexes of a common triangular base. The proposed locations of the TriFrames are marked in Fig. \ref{fig:ManhattanEastRiver}(c) by triangles.
Underwater cables from each unit connect to the onshore controls and the electric grid.
The estimated average annual production from the array is between $1680-2400\,MWh$ \citep{vpireportv2}.
The electricity produced will be added to the grid and used to power buildings in Roosevelt Island.

\subsection{Construction of the digital terrain model}
High-resolution bathymetry data were collected within the deployment site for the RITE project (see Fig. \ref{fig:ManhattanEastRiver}(c)) in 2015 on a grid of $0.15\,m \times 0.15\,m$.
Using this bathymetry survey, a digital elevation model of the river was created by discretizing the river bed with an unstructured triangular mesh with approximately $2.2\times 10^5$ triangular elements and $4.4\times 10^5$ points.
Some regions within the river, where survey data was missing, were truncated and/or interpolated to provide the bathymetry immersed boundary.
The digital elevation model for the $675\,m$ long simulated reach is shown in Fig \ref{fig:eastriver-domain}(a).
The width of the channel in this reach varies between $175\,m$ and $220\,m$ while
the flow depth varies between $2\,m$ and $13\,m$ with most common depth over the reach being approximately $10\,m$. Depths are relative to NAVD 88 datum.

\begin{figure}[!b]
\centering
\includegraphics[width=160mm]{east-river-map.jpg}
\caption{Perspective view of the New York City area: (a) North-northeast (NNE) panoramic view of Manhattan; (b) West-southwest (WSW) view of the East River and showing the location of the field-scale study of marine hydrokinetic turbine array, map data \textcopyright 2017 Google. (c) RITE project boundaries with proposed TriFrame locations ($\Delta$). Copyright of Verdant Power Inc. \citep{vpireportv2}.}
\label{fig:ManhattanEastRiver}
\end{figure}

\section{East River Simulation Without Turbines}
\label{sec:baseline}
In this section we report the results of LES of the turbulent flow in the East River reach without the turbines at the nominal inflow value.
This baseline simulation will provide the baseline of the river flow to subsequently investigate the effect of installing the array of turbines in the river.
The simulation results are also compared with limited field measurements in terms of a single vertical velocity profile measured using Acoustic Doppler Current Profiler (ADCP).

\subsection{Computational setup}
\label{sec:baseline-setup}
A Cartesian box of size $720\,m$, $14\,m$ and $270\,m$ in the streamwise (Z), spanwise (X) and vertical (Y) directions, respectively, was chosen as the computational domain within which the digitally reconstructed river bathymetry is immersed (see Fig. \ref{fig:eastriver-domain}).
The shore-line for the river was extracted using the ArcGIS mapping tool from a satellite map made available within the tool.
This ensured that the physical shore-lines of the river are accurately captured in the computational domain.
The bathymetry was then extended outside of the river boundaries to span the computational domain in the XZ plane (see Fig. \ref{fig:eastriver-domain}(b)).
Finite positive depth ($1\,m$) was assigned to on-shore region in the land.
The outlet boundary section was artificially extended by repeating the last bathymetry cross section over $100\,m$ in the streamwise direction.
This artificially created straight section of the river is used to facilitate application of outflow boundary conditions and eliminate spurious reflections at the downstream boundary that could contaminate the simulated flow and destabilize the flow solver.

\begin{figure}[htp]
  \center
  \includegraphics[width=\textwidth, keepaspectratio=true]{eastriver-domain.jpg}
  \caption{Computational domain and digital elevation model of simulated channel. A sample channel bathymetry is shown in the inset window represented by unstructured mesh. A star in (a) marks the location where an Acoustic Doppler Current Profiler (ADCP) was placed for measurement in the field.
(b) Comparison of computed and measured velocity in the East River. Horizontal solid line denotes hub-height position if a turbine were to be placed here.
(c) East River model with array of 30 turbines placed in TriFrame arrangement and (d) local grid refinement in the wake of each turbine.}
  \label{fig:eastriver-domain}
\end{figure}

Fig. \ref{fig:eastriver-domain}(a) shows a sample of the unstructured triangular mesh which has been generated to discretize the river's bed topography, as needed by the sharp interface immersed boundary method in VFS-Rivers.
The bottom bed was treated as a rigid bed with no sediment transport since it is made of large rocks on bedrock.
A wall modeling approach, as described earlier, was used for the boundary condition on the bed.
At the inlet boundary of the domain, instantaneous flowfields from a pre-computed fully developed turbulent flow are prescribed so that statistically the inflow corresponds to fully developed turbulent flow through a straight channel with cross-section identical to the most upstream cross-section of the East River bathymetry used in the simulations. That is, the so prescribed flowfields were obtained from a precursory LES through a straight channel with periodic boundary conditions in the streamwise direction.
Naturally, the so prescribed inflow conditions do not correspond to the actual state of the river flow at the entrance of the East River reach we simulate herein.
However, we note here that for the turbine simulations presented next, the streamwise distance between the inflow section and the most upstream turbine in the array is 12D allowing for sufficient distance for the flow to develop over the actual river bathymetry before it encounters the turbines.
At the downstream outlet boundary of the domain, Neumann (zero streamwise gradient) boundary conditions were imposed for all three velocity components. The river free surface is treated as rigid lid.

The nominal flow rate in the river and representative velocity based on the ADCP-measurements by Verdant Power were approximated to be $3.28\times10^3\,m^3/s$ with a $2\,m/s$, respectively.
From the bathymetry survey, the modal depth in the channel is approximately $H=10\,m$.
Using the above values of velocity and depth, the Reynolds number in the river is $2\times 10^7$, which is typical value for river flows.
The background Cartesian domain was discretized with $360\times 40\times 1036$ cells in the X, Y and Z directions, respectively, i.e. a total of $1.49\times 10^7$ grid cells. Grid points are distributed uniformly in all three directions,
resulting in spacing of $0.75\,m$, $0.35\,m$ and $0.7\,m$ in the X, Y and Z directions, respectively. The time step in the calculations corresponds to Courant-Friedrichs-Lewy (CFL) number of $CFL=0.03$.
The simulations were carried out until the total kinetic energy in the domain is statistically converged. Subsequently, the flow-field was averaged for approximately 3 flow-through times where a flow-through time is defined as time taken to travel the streamwise extent of the domain at velocity $W_b$, which is the bulk inlet velocity.
The simulations were performed on 264 processors of HPC clusters composed of Intel 2.4 GHz processors for approximately 1 month.

\subsection{Comparisons with field measurements}
\label{sec:baseline-results}
A single velocity profile was measured in the river using ADCP along the depth at the Universal Transverse Mercator (UTM) coordinates of (588987.03 E, 4513118.35 N) in zone 18N, hereafter known as ADCP-N location also shown in Fig. \ref{fig:eastriver-domain}(a).
Figure \ref{fig:eastriver-domain}(b) shows comparison of computed mean velocity with the field measurements in the East River provided by Verdant Power.
Any discrepancies between the experimental measurements and the numerical calculations could be attributed to the following.
The river bathymetry used in this simulation was obtained in 2015 whereas the ADCP velocity measurements at the above-mentioned location were obtained nearly 2 years earlier. This time difference naturally resulted in discrepancies in the exact bathymetry in the vicinity of ADCP-N location due to natural evolution of the river bed thereby altering the flowfield.
The reported flow-depth from the measurements was $9.16\,m$ approximately 10 \% less than $9.82\,m$ observed during the 2015 survey.
Moreover, the exact flow-rate of the river at the time of the measurements was unknown and it was only approximated using the point measurement and assuming same mean velocity across a cross-section approximately perpendicular to the nominal flow direction in the channel.
Due to the nature of the site, it is extremely difficult to obtain high fidelity field measurements and turbulence statistics that are accurately correlated with the time of tide in the East Channel.
Hence, in the limit of available data and considering the variability of the processes involved, we argue that the simulations are in general agreement with the measurements.
The average relative error is around 6\%, which is acceptable considering the complexity of the calculation and the uncertainties mentioned above.
We also point to the extensive validation studies of the VFS-Rivers code for flows in rivers and streams and for cases for which detailed mean flow and turbulence statistics measurements were available \citep{kang2011high, khosronejad2016large}, which build confidence in the accuracy of the present simulations.
More results for this case are shown in next section in comparison with the turbine array simulation.

\section{Simulation of East River with the turbine array}
\label{sec:array-simulation}
In this section, we carry out and discuss the results of LES of 10 TriFrames of axial hydrokinetic turbines installed on the river bed per the array design developed by Verdant Power is performed.
Using the Verdent Power's Generation 5 Free Flow System axial hydrokinetic turbines \citep{FreeFlow2018}, the 30 turbine array is placed in the East River section as shown in Fig. \ref{fig:eastriver-domain}(c).
The turbine rotors are $5\,m$ in diameter and the hub height is $4.58\,m$ from the bottom.
This height is fixed due to the construction of the TriFrame and is uniform for all turbines.
The distance between the turbine's hub from the free surface is variable depending on the depth of the channel at the individual turbine installation location.
The geometrical details of the TriFrames as well as their hydrodynamic efficiency and wake characteristics have been the subject of a recently published paper by \citet{chawdhary2017wake}.
The TriFrames from first to last, in the positive Z direction, are numbered as TF-10 to TF-1 in reverse order in the Verdant's proposed location.

The computational grid for this simulation is derived from the one used for the baseline case in the previous section.
Two-level geometry-based adaptive mesh refinement was applied to the baseline grid to obtain high resolution in the wake region of the turbines.
The local refinement was along an elliptical cylinder with the central axis of the cylinder aligned with the center of the turbines.
For each turbine, the extent of the refinement region is 1.4D and 2D in vertical and spanwise directions, respectively.
The refinement region further extends from 1D upstream of turbine location to 7D downstream of the turbine.
The grid refinement procedure added approximately $9.4 \times 10^6$ cells, resulting in the post-refinement grid having $2.43\times 10^7$ number of Cartesian cells.
The grid cells were Cartesian and aspect ratio was 2.1:1:2 for all the cells in X, Y and Z directions, respectively.
The local resolution in the turbine wake was $0.1875\,m$, $0.0875\,m$ ,$0.1872\,m$ in the X, Y and Z directions, respectively, which corresponds to 27, 57, 29 points per turbine diameter.
Such a grid resolution is known to give acceptable results for the turbine modeled with an actuator line model \citep{yangtoward}. Actuator line models have been previously used successfully to predict the far wake dynamics of axial hydrokinetic turbines \citep{kang2014onset, churchfield2013large} and wind turbines \citep{yang2013large, porte2013numerical, angelidis2016unstructured}.
Also, it is evident from prior numerical studies \citep{angelidis2016unstructured} and the results we present herein that the proposed numerical framework allows turbine simulations on locally refined grids without introducing any artificial reflection of the vortical structures at the coarse/fine interface of the computational mesh.

The rest of the flow and boundary conditions were the same as used for the baseline flow simulation in the Section \ref{sec:baseline-setup}.
The simulation was run until the total kinetic energy in the domain is statistically converged which happened in approximately 1.2 flow-through times to obtain turbulent statistics.
The flow-field was then averaged for another 5 flow-through times.

\subsection{Results}
\begin{figure}[htp]
  \center
  \includegraphics[width=\textwidth, keepaspectratio=true]{east-river-velocity.jpg}
  \caption{Contours of time-averaged streamwise velocity of the East Channel of East River, normalized by the bulk mean inflow velocity, in an XZ plane at free surface
(a) without turbines, (b) with turbines, and at $7\,m$ depth
(c) without turbines, (d) with turbines.
(e) Contours of instantaneous streamwise velocity in an XZ plane $7\,m$ below the free surface with TriFrames.
}
  \label{fig:eastriver-W}
\end{figure}

Figure \ref{fig:eastriver-W}(a) and (b) shows the contours of time-averaged streamwise velocity at the freesurface of the channel. The results from the baseline simulation without turbines are also shown using the same contour levels for comparison.
The baseline simulation shows that the velocity at the freesurface is higher in the upper half South-East side of the river.
The kink in the geometry North-East of the East River, which is essentially upstream of the simulated section of the channel, is responsible for the generation of a significant wake region in the flow. Hence, the velocity distribution is greatly effected by the strong deceleration in northwest of the east channel of the East River.
Its effect on the simulated section is caused because of the precursory simulation for generating the inflow.
The domain for inflow generation was generated by extrusion in the streamwise (Z) direction.
This is a reasonable approximation because the channel upstream of the inflow section is straight at the end of curvature. As we already discussed, this was necessitated because bathymetric data was available only for a limited channel reach.
Ideally, the simulated channel reach should extend upstream of the present channel and VFS-Rivers is capable of handling such an extended domain. However, realizing this requires more detailed bathymetry data and is beyond the scope of the present work.
The contours from the simulation with the turbine array installed show a similar trend as the baseline case with high velocity in the upper half of the river.
There is a weak signature of the turbine wakes marked by the region of reduced velocity on the free-surface of the channel. The footprint of the turbine wake on the surface flow is more pronounced for the TriFrames in the middle of the array. The first two TriFrames barely show any effect on the free surface. This is because the hub height of these turbines is much lower compared to the other TriFrames -- this is evident from the digital elevation model showing depth contour in the river (Fig. \ref{fig:eastriver-domain}(a)).

In Fig. \ref{fig:eastriver-W}(c) and (d), the contours of time-averaged velocity are shown on a horizontal plane $7\,m$ below the free surface.
The hub of the upstream turbines is located approximately $7\,m$ below the free surface.
In Fig. \ref{fig:eastriver-W}(c), we note for the baseline simulation a distinct feature of the bathymetry on the bottom-left corner where a ridge is seen to contribute to the slow velocity wake in this region discussed earlier.
In Fig. \ref{fig:eastriver-W}(d), the wakes of the turbines are clearly visible.
The wakes of the first three TriFrames, specifically the first and second, do not align with the axis of rotation. This indicates that the yawing mechanism of the turbines should turn them in the primary incoming flow direction which, for these turbines, is not in Z directions.
The yawing mechanism was not modeled in the present case (instead the turbines were assumed fixed in direction), hence we see the wake alignment departing from the axis of rotation.
The overall wake of the array suggests that the staggering of the 10 TriFrames as  proposed by Verdant Power is more efficient for energy extraction because of higher incoming flow momentum for the downstream TriFrames.
Additionally, Fig. \ref{fig:eastriver-W}(e) shows contours of instantaneous streamwise velocity on a plane $7\,m$ below the free surface, i.e. near the hub-height of the first TriFrame. This contour plot clearly shows the complex dynamics of the flow captured in the simulation.
The large range of the scales present in the model can be readily seen.
The $5\,m$-diameter turbine is orders of magnitudes smaller than the dimensions of the river. Yet, the unstructured Cartesian grid enabled us to locally refine the grid and resolve the flow in the wake of turbines.
The complex interaction of the scales resolved by the refined grid is shown in the inset figure for a smaller highlighted region.
An equivalent uniform structured grid, with resolution equal to the maximum achieved in the wake of the turbines, would consist of a staggering $9.5\times10^8$ cells (close to one billion); making such a ``brute-force" calculation extremely demanding from the computational standpoint.
Being able to carry out LES across such a broad range of spatial scales using relatively coarse grids (compared to those that would be required for ``brute-force" simulations) is only possible using the proposed multi-resolution modeling framework with local refinement.

Figure \ref{fig:eastriver-vortmag}(a) shows contours of time-averaged vorticity magnitude at the free surface of the river without the turbine array. There is no significant vorticity at the free surface for the scale shown here, except for the vorticity generated by the river banks.
For the simulation with the turbine array, Fig. \ref{fig:eastriver-vortmag}(b) shows that the TriFrames make only a weak mark on free surface vorticity values. In fact their surface signature is only visible using the exaggerated scales selected for this purpose in Fig. \ref{fig:eastriver-vortmag}(b).
In Fig. \ref{fig:eastriver-vortmag}(c) and (d), the time-averaged vorticity contours are shown at the XZ planes $5\,m$ and $7\,m$ below the free surface of the channel, respectively.
The wakes of the turbines show higher vorticity magnitude, which was absent when no turbines were installed.
The vorticity magnitude contours follow the low velocity wakes similar to the streamwise vorticity distribution.
Higher vorticity also exists near the banks and other geometrical features of the river bed as seen in Fig. \ref{fig:eastriver-vortmag}(c) near the downstream end of the channel.

\begin{figure}[htp]
\center
  \includegraphics[width=\textwidth, keepaspectratio=true]{Fig_18_19_20.png}
  \caption{Contours of time-averaged vorticity magnitude normalized by the bulk mean inflow velocity $W_b/D$ and rotor diameter $D$ in an XZ plane of East River (a) without turbine array at free surface, and with 10 TriFrames of turbines installed at (b) free surface, (c) $5\,m$ depth and (d) $7\,m$ depth.}
  \label{fig:eastriver-vortmag}
\end{figure}

\subsection{How TriFrames affect the flow in East River}
 \begin{figure}[th]
  \center
  \includegraphics[width=310pt, keepaspectratio=true]{W-all-11.jpeg}
  \caption{Transverse profiles of streamwise velocity on the XZ plane $5\,m$ below the free surface of the East River along spanwise (X) direction with and without 10 TriFrames of turbines installed at locations (a)$Z=-23.8\,m$ (b)$Z=36.2\,m$ (c)$Z=93.6\,m$ (d)$Z=154.4\,m$ (e)$Z=213.2\,m$ (f)$Z=274.5\,m$ (g)$Z=332.7\,m$ (h)$Z=393.9\,m$ (i)$Z=454.1\,m$ (j)$Z=515.2\,m$ (k)$Z=569.3\,m$. Location (a) is 6D upstream of first TriFrame and following locations are 6D downstream of successive TriFrames. (l) shows the lines along which profiles were extracted.}
  \label{fig:Wprofiles}
\end{figure}

The presence of the turbine array alters the flow patterns in the river by extracting momentum from the stream flow and increasing the turbulence kinetic energy (TKE). In Fig. \ref{fig:Wprofiles} we compare the calculated mean streamwise velocity profiles at several downstream location in the river, approximately halfway between the TriFrames.
In the first plot \ref{fig:Wprofiles}(a), the velocity 6D upstream of the first TriFrame is the same for the baseline as well as flow with the turbines.
A possible reason for this could be the effect of not accounting for the blockage effect the turbines would impart on the large-scale East River flow whereby the flow could bypass to the west channel of the East River if a larger region was considered in the simulation. However, we stipulate that given the small blockage ratio of a TriFrame (0.033\%) the bypass flow to the West Channel of the East River would not be significant \citep{chen2011blockage,nishino2012effects} -- the validity of this assertion, however, remains to be confirmed by future simulations considering a much large section of the East River with the Roosevelt Island included in the model.
In the next plot Fig. \ref{fig:Wprofiles}(b), 6D downstream of the first TriFrame, flow de-acceleration is observed in the spanwise location of the turbines. The W-shaped profile marks the signature of the two downstream turbines of the TriFrame. This shape is similar to the TriFrame wake signature from a single wake TriFrame study.
The profile in Fig. \ref{fig:Wprofiles}(c) appears to be more similar to the TriFrame wake signature since the hub of second TriFrame is closer to $5\,m$ depth.
Similar wake signature is seen for the following TriFrames. In Fig. \ref{fig:Wprofiles}(d) through \ref{fig:Wprofiles}(k), the presence of turbines result in higher flow velocity in the bypass region around the turbines. Noticeably, the span where there was no turbine shows only slightly (up to 10\% in \ref{fig:Wprofiles}(i)) higher streamwise velocity.

Fig. \ref{fig:TKEprofiles} shows transverse profiles of the TKE at the same locations as in Fig. \ref{fig:Wprofiles} with and without the turbine array installed.
As expected, the incoming flow upstream of the array shows relatively higher levels of TKE generated by the river banks. This is consistent with the incoming flow fed as the inflow boundary condition which was generated by assuming a straight channel extending upstream of the river with the same cross-section as the inlet section.
The remaining profiles in Fig. \ref{fig:TKEprofiles} (b through k) reveal higher levels of TKE in the wake of every TriFrame, which is the expected effect of TriFrame added turbulence in the baseline river flow. It is worth noting, however, that the effect of the TriFrames is restricted in the immediate vicinity of the turbines as the levels of turbulence near the left (relative to the turbines as shown in Fig. \ref{fig:Wprofiles}) bank are almost identical with and without turbines.

 \begin{figure}[th]
  \center
  \includegraphics[width=410pt, keepaspectratio=true]{TKE-all-11.jpeg}
  \caption{Turbulent kinetic energy (TKE) profiles in XZ plane $5\,m$ below the free surface of the East River along spanwise (X) direction with and without 10 TriFrames of turbines installed at locations (a)$Z=-23.8\,m$ (b)$Z=36.2\,m$ (c)$Z=93.6\,m$ (d)$Z=154.4\,m$ (e)$Z=213.2\,m$ (f)$Z=274.5\,m$ (g)$Z=332.7\,m$ (h)$Z=393.9\,m$ (i)$Z=454.1\,m$ (j)$Z=515.2\,m$ (k)$Z=569.3\,m$. Location (a) is 6D upstream of first TriFrame and following locations are 6D downstream of successive TriFrames. Fig.\ref{fig:Wprofiles} (l) shows the lines along which profiles were extracted.}
  \label{fig:TKEprofiles}
\end{figure}

\section{Conclusions}
\label{sec:conclusion}
In this work we demonstrated the use of a powerful numerical framework to successfully perform a LES at site-scale of a natural marine environment with a MHK turbine array. Such numerical undertaking was possible with the use of high performance computing and the new generation of the VFS-Rivers code featuring local mesh refinement on unstructured Cartesian grids.
Locally refined grids allowed the bridging of scales between the river channel and the turbines and the wakes they induce on a grid with significantly smaller (by two orders of magnitude) number of grid nodes than that would be required using a ``brute-force" approach--i.e. discretizing the entire river channel with a uniform grid with spacing small enough to resolve the wake of each turbine.
More specifically, we were able to perform simulations on a grid with 24 million grid nodes with local resolution near the turbines ranging from D/27 to D/57. Similar resolution with the brute-force approach would require close to one billion grid nodes.
Simulations were first performed in the river for a nominal flow rate without the turbines to obtain baseline flow characteristics.
Field measurements in the river were made using an ADCP to obtain a vertical profile of streamwise velocity at a single location.
The velocity profile from the baseline flow was compared with this available velocity profile.
The prediction of velocity profile showed reasonable agreement with the field data but also underscored the difficulties in obtaining measurements of sufficient quality in harsh tidal environments to enable detailed validation of computational methods at field scale. Future work in this site should focus on obtaining simultaneous measurements of river bathymetry and flow statistics at several locations through the channel to enable a more comprehensive validation of the flow solver for the baseline case.

LES of the East River channel with the 30 turbine array in place, arranged in 10 TriFrames, provided valuable insights about the hydrodynamics of the array and its impact on the baseline river flow.
The bathymetry of the river site resulted in distinct site-specific flow patterns that can only be simulated by data-informed simulations such as those we reported herein.
Our simulations indicated a marginal acceleration on the baseline river flow in the regions where turbines were not present. Comparison with the baseline flow in terms of mean streamwise velocity as well as vorticity magnitude indicates that there is a very small signature of the turbine wake at the free surface of the channel, thus, suggesting that the array would have essentially no effect on the navigability of the East River while it operates. Overall, the surface effects of the array are found to be negligible compared to the free surface disturbances already present in the baseline flow of tidal channel.
The wakes of the first few TriFrames of the array were not aligned with the axis of rotation defined by orientation of turbines.
This means that the yaw of the turbines should turn the turbine in the direction of the incoming flow.
The yaw mechanism of the turbine was not modeled in the present simulation.

Future work will focus on refining the model to eliminate uncertainties so that we can obtain better answers regarding the site specific performance of the proposed array and the deployment site.
In this study, for instance, only limited bathymetry data was available upstream of the turbine array. A more extensive bathymetry of the site is needed in order to avoid the unwanted effects created by the inflow boundary treatment due to the missing upstream section.
Geometry-based adaptive grid refinement was adopted in the present simulations. However, in the future, temporal adaptive mesh refinement may also be adopted in the simulations, similar to many astronomical simulations \citep{iapichino2008hydrodynamical, fryxell2000flash}. Coupled with efficient repartitioning algorithms, such simulations will enable dynamic resolution of coherent structures in the wake of the turbines while optimizing the computational efficiency.
Such capability will be especially useful when the yaw mechanism of the turbines will be include din the simulations to enable dynamic wake stirring.

\section{Acknowledgement*}
\label{sec:acknowledgments}
This work was  supported by National Science Foundation (NSF) grant number \textit{IIP-1318201}.
The bathymetry survey for the simulated section was provided by Verdant Power Inc. through a contractor Ocean Survey Inc. Computational resources were provided by the Minnesota Supercomputing Institute (MSI) at University of Minnesota.

\bibliographystyle{apalike}

redpajama_set_name: RedPajamaArXiv


Sahag-Mesrob has a vast program of extra-curricular activities to encourage parent participation, community involvement, and promote learning and sharing by students. Some of these activities are planned to raise money to meet the school's financial obligations. Registration and tuition fees cover about 70% of the school's budget. The balance is generated from donations and fund raising activities.
Athletics: Qualified* upper grade students participate in inter-school sports and Kaham games.
Music/Band/Choir/Drama: Qualified* upper grade students spend extra time to plan and prepare for performances in choir, band and drama. They are required to attend all extra-curricular practices and programs planned by the school.
Speech Meets, Spelling Bee, Piano and Band Festivals: Students who demonstrate a desire and demonstrate potential are selected to participate in ACSI sponsored contests held annually.
Fund Raising Activities: Occasionally each grade will plan an activity to raise funds for their class for a special project. These activities include bake sales, luncheons, car wash, etc. All such activities must be pre-approved by the Administration. *Qualified students are those who have achieved C or better in all subjects and "S" or better in conduct.
6th through 8th grade students meet with the Principal to elect student officers in each class. The student council meets to discuss ways to enhance school activities and present recommendations to improve overall school activities. To be on the student council, a student must have a "C" or better in all subjects and "S" or better in conduct. Elections are held during the 2nd quarter of the school year.
May be planned once a month for students born in that month. Planning must be done in advance with the homeroom teacher and held during lunchtime only. Parents are asked to bring only Cup Cakes to celebrate their child's birthday.
Note: Parents who wish to give a Birthday party outside the school are asked to please consider inviting the whole class, only boys, or only girls to not exclude or single out a few children.
Birthdays are excellent opportunities to donate books to the school Library. Each donated book will have a bookplate with the student's name. These books will be read, valued and treasured by everyone for many years.
Field trips are an integral part of the learning experience. Teachers arrange approximately three to four field trips each year to enrich the curriculum in Science, Math, Art, Social Studies and fun activities.
These activities are scheduled, parents are notified, permission slips signed in advance, fees charged, and volunteers required for car-pooling. The homeroom teacher, in consultation with the Administration, selects parents for carpooling and supervision.
Only parents who have been selected and agree to follow school policies and guidelines given by the teacher may go to the field trip. Siblings, relatives, or grandparents are NOT ALLOWED to go to the field trip. This is in accordance to the school's insurance policy guidelines. Occasionally, parents will be asked to use their cars for transportation to and from a field trip. These parents will be required to present the office proof of proper car insurance.


text:
Gunjan Saxena: I had support of fellow officers, supervisors, commanding officers at IAF
Sohel F Fidai :
Just a day after the Indian Air Force (IAF) raised objection over the presentation of gender bias in the film, Gunjan Saxena: The Kargil Girl, former IAF pilot Gunjan Saxena, on whose life the film is based, has opened up about her experience at the Air Force as compared to what has been portrayed in the commercial film. She says she had support of fellow officers, supervisors, and commanding officers.
On Wednesday, it was revealed that IAF has written a letter to Dharma Productions, Netflix and the Central Board of Film Certification (CBFC), raising objections over inaccurate presentation of gender bias in "Gunjan Saxena: The Kargil Girl", which documents the life of Gunjan Saxena and her journey towards becoming the first Indian Air Force woman pilot, who was part of the 1999 Kargil conflict. The Air Force said that certain scenes and dialogues in the movie portray it in a "negative light".
When IANS asked Saxena how she perceives all such sequences, she said: "Indian Air Force is at the core and the heart of this film. It is the very training of the Indian Air Force and the strong ethos of the Indian Air Force, which really gave me the courage to do all those extraordinary things that I could. And not only me, I think it is the strong values and rich culture of the air force that is really the driving force behind all the women officers from all the different branches of the Indian Air Force who have served or are still serving in this organisation."
"Yes, as a commercial movie or as a work of fiction, this film has creatively tried to capture my story or my journey. But what cannot be denied is that even in this film the doors did open and opportunities were given," added Saxena, who graduated from Hansraj College in Delhi, and cleared the entrance exam and joined the Indian Air Force in 1994.
The real-life hero continued: "Equal opportunities were there for me to perform, and I think they are still there for all the women officers who are in this organisation. We don't need any other or bigger proof than the fact that over the last 20 years the number of women officers in the Indian Air Force has gone up at such a high rate. So, this shows that the Indian Air Force, which is such a deeply respected institution, has been so progressive and positive about bringing about this change in itself. So I think that's how I would like to address this question."
Reflecting upon her dream, she said: "As a young girl, my only dream was to fly, be there in the blue skies and this personal dream of mine was realised through the Indian Air Force, and that's why I feel that for any dream to become a reality, I think it is also very important for the environment around that individual to be supportive. In my journey that supportive environment was first my family and then it was the Indian Air Force, and I think that is a reason I was able to realise my individual dream of flying."
In "Gunjan Saxena: The Kargil Girl", which was released on Netflix, Janhvi Kapoor plays the titular role.
Apart from the emotion, patriotic spirit and drama, the one thing that was highlighted in the narrative of the movie was how casual sexism can play a big role in chipping one's dream, and fuel the whole gender divide.
Asked about how hard it was for her to find a way through despite the gender bias, Saxena said: "I think I was always lucky to have people around me who supported me and who rooted for me. Be it my family or the Indian Air Force at both places, I got support to pursue my dream and it's a privilege. If you are the first one to be doing something, along with the privilege comes a whole lot of responsibility.
"Whenever there is a major change happening in any organisation or any field for that matter, it is never easy. There are teething troubles. During my initial days in the Indian Air Force, I had the support of my fellow officers, my supervisors and commanding officers who helped me during the difficult times or when I was caught in a difficult situation," she added.
Saxena continued: "When there is major change happening, some of the individuals are able to accept change more readily as compared to the others, and some individuals take more time to adjust to a major change. So I think that's how I would like to put it and what is really of consequence and importance here and what really needs to be focused is that even though it did take time for some individuals to change, that change did occur, it did happen and in a very positive and right direction."
At present, Saxena spends her time looking after her daughter. She might be away from the sky, but her love for flying high is very much alive.
"Looking after my family and daily chores keeps me occupied. For the last three years, I've been involved in this process of this film being made. I'm very fortunate that my husband is still in active flying. We still have discussions around aviation, which I find very interesting and enjoyable," she said.
"At times when I sleep, I have dreams of being in the cockpit or flying a sortie," said Saxena, who feels the film is not just about her but also about "so many other extraordinary women"
Sajid Wajid releases a poster and trailer of his Independence Day song "Jeet Jayenge Hum"
Subhash Ghai, explains the vision behind the new music label – Audeus Music

redpajama_set_name: RedPajamaCommonCrawl


Since I was short on time today, I needed a meal that I could prepare in advance. Beef skewers are a great make ahead meal because the longer the meat marinates, the more flavorful and tender it becomes. I put together the marinade and cut up the meat and vegetables early in the afternoon. I let the meat marinate in the refrigerator until dinner time. When it was time for dinner, I lit the Big Green Egg, threaded the meat and vegetables onto the skewers and made some brown rice. A dinner that comes together in under 30 minutes - priceless.
Get creative with your kabobs and send me your ideas and suggestions. You never know when I might try one of your recipes.
Yesterday, I smoked this turkey breast on the Big Green Egg. I like to cook a turkey or turkey breast over the weekend because my family can eat it all week. After I serve it the first night, I take the meat off the bones and divide it into small plastic containers. I use the turkey for soups, salads, tacos, sandwiches and casseroles. It is a big time saver to have the turkey already cooked when I am trying to prepare dinner in a hurry. I used this recipe for our Thanksgiving turkey and it did not disappoint.
Heat oil in saucepan and add garlic, onions and orange. Cook until fragrant. Add water or cider and fresh herbs. Simmer for 5 minutes. Stir in salt and remove from heat.
Stir in 6 cups of ice water and cool to room temperature. Place in a bucket or plastic tub and add turkey. Cover and refrigerate overnight.
Remove turkey from brine and rinse. Place turkey in a disposable aluminum pan and pour broth into the bottom of the pan. Heat the egg to 250 and place the plate setter upside down over the coals. Place the turkey pan on the plate setter. Cook turkey at 250 for about 6 hours. Remove from egg and tent with foil.
Turkeys are a delicious source of lean protein and really shouldn't be reserved just for Thanksgiving. They are relatively inexpensive and easy to cook. Give it a try and let me know what you think.
This is my very first blog. I am excited to be able to share my love of cooking with you. My goal is to blog about the recipes that I make in my kitchen for my busy family. I promise to share both the successful and the unsuccessful recipes. (Even chefs have their share of recipe failures.) I am looking forward to taking this journey with you.
Tomatoes are the name of the game this week. The 3 tomato plants in my garden are loaded with red tomatoes. (Sweet 100, Roma and Better Boy) I have been incorporating fresh tomatoes into almost every meal since they are at their peak. Tonight's dinner was southwestern shrimp salad. With the temperatures reaching nearly 100 this week, I thought a fresh from the garden salad would be the perfect summer meal. I paired our salad with some fresh pineapple and baked tortilla chips with salsa.
Combine lime juice, olive oil, cumin, garlic and red pepper flakes in a skillet. Heat over medium heat. Add shrimp and saute until almost pink. Add corn and cook until shrimp is pink. Remove from heat and let cool. Stir in black beans, green onions and tomatoes. Divide lettuce between 4 serving bowls or plates. Top with shrimp mixture and pour any remaining liquid over the salad. Garnish with avocado and cilantro. I didn't need any additional dressing but my husband added salsa to his salad.


text:
Report: Kansas documents 54% surge in drug overdose fatalities in early 2021 – Kansas Reflector
The Kansas Department of Health and Environment says Kansas experienced a 54% surge in drug overdose fatalities in the first six months of 2021 compared to that period in 2020. KDHE attributed about 45% of those deaths to ingestion of fentanyl, which is often added to other drugs such as cocaine and heroin. (Getty Images)
TOPEKA — Preliminary reports indicate Kansas suffered a 54% increase in drug overdoses during the first six months of 2021 compared to the same period in 2020, state health officials said.
The Kansas Department of Health and Environment said provisional results not yet available to the public identified 338 people in Kansas who died of drug overdose between Jan. 1 and June 30 of last year. In that same six-month period in 2020, Kansas reported 220 fatalities from overdoses.
KDHE secretary Janet Stanek said resources were available to people dealing with drug addiction or abuse.
"Fatal drug overdoses have been on the rise for years across the country," Stanek said. "The cause for the rise in deaths is complex and is a reflection of an individuals social determinants of health. We want all Kansans to know that there are resources available to those with a substance abuse disorder."
Of the 338 deaths in Kansas in the first half of 2021, 149 involved fentanyl or fentanyl analogs. Fentanyl is a synthetic opioid frequently combined with heroin, cocaine, methamphetamine and MDMA. This cocktail is especially risky when people don't know if they're consuming fentanyl or don't have precise information on how much fentanyl was added to the other drugs.
The National Institute on Drug Abuse says fentanyl is similar to morphine, but 50 to 100 times more potent. Is is typically used by doctors to care for patients in severe pain, especially following surgery.
In addition, the mid-year report on Kansas said, 149 of the fatalities involved methamphetamine and 40 were linked to other drugs, such as cocaine, benzodiazepines and prescription opioids.
The statistics on Kansas were drawn from preliminary reporting to the State Unintentional Drug Overdose Reporting System, or SUDORS, administered by the U.S. Centers for Disease, Control and Prevention. SUDORS combines information from death certificates, medical examiner and coroner reports, and law enforcement documents to gather insight into overdose deaths.
Visit PreventOverdoseKS.org for resources, epidemiological data and information on Kansas' efforts to prevent drug overdose. Those in need of assistance can call Kansas' SUD hotline at 866-645-8216 or visit FindTreatment.gov to locate treatment services.
Pharmacies offering naloxone, a medication capable of reversing an opioid overdose, can be found at ktracs.ks.gov/pharmacists/naloxone-dispensing. Under Kansas law, KDHE says, pharmacists can legally dispense naloxone to patients without a prescription.
The Kansas Department of Aging and Disability Services provides grant funding to DCCCA to operate a naloxone program. DCCCA has a limited supply of naloxone kits for people unable to access the medication through a pharmacy.
▪ You must give Kansas Reflector credit, including https://kansasreflector.com and author.
▪ If you publish online, include the links from the story, and a link to Kansas Reflector.
▪ Stories may be edited for in-house style or to shorten. More substantial changes should be noted as additional and conducted by your publication.
▪ You can publish our graphics and any photos that are credited to Kansas Reflector with the stories with which they originally appeared. For any other uses, you must seek permission from us at [email protected]
▪ If you share the story on social media, please mention @kansasreflector on Twitter and kansasreflector on Facebook.
▪ Don't sell the story.
▪ Don't sell ads against the story. Feel free, however, to publish it on a page with ads you've already sold.
▪ Content should not be published behind a paywall; please reach out to the editor-in-chief if you have questions about your particular paywall system.
by Tim Carpenter, Kansas Reflector
Kansas Reflector is part of States Newsroom, a network of news bureaus supported by grants and a coalition of donors as a 501c(3) public charity. Kansas Reflector maintains editorial independence. Contact Editor Sherman Smith for questions: info@kansasreflector.com. Follow Kansas Reflector on Facebook and Twitter.
Our stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site. Please see our republishing guidelines for use of photos and graphics.
Tim Carpenter has reported on Kansas for 35 years. He covered the Capitol for 16 years at the Topeka Capital-Journal and previously worked for the Lawrence Journal-World and United Press International. He has been recognized for investigative reporting on Kansas government and politics. He won the Kansas Press Association's Victor Murdock Award six times. The William Allen White Foundation honored him four times with its Burton Marvin News Enterprise Award. The Kansas City Press Club twice presented him its Journalist of the Year Award and more recently its Lifetime Achievement Award. He earned an agriculture degree at Kansas State University and grew up on a small dairy and beef cattle farm in Missouri. He is an amateur woodworker and drives Studebaker cars.
DEMOCRACY TOOLKIT
© Kansas Reflector, 2022
Kansas Reflector is a nonprofit news operation providing in-depth reporting, diverse opinions and daily coverage of state government and politics. This public service is free to readers and other news outlets.
Ethics Policy | Privacy Policy
Our stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site.


The book is a simple narrative between a dying professor, Morrie Schwartz, and his student, Mitch Albom. The book during its course covers most aspects of life and the views of the dying professor are offered on these.
The author of book, through a TV show, discovers how is former professor is dying from an ailment named ALS. The author, all of sudden is rendered workless due to a strike, and hence are born the circumstantial conditions for his visits to his professor's house. He does so by visiting his professor on a single Tuesday but ends up continuing this process over a period of 14 such ones. During the course of these Tuesday's, the author and Morrie discuss various facets of life, ranging from those of the world to those of personal nature.
All in all, this book puts into words all the things we are thinking about but not really bring out in the open for discussion and consumption. There are times while reading this book, as a reader, you are being preached a bit more than required, but I guess that is one aspect all self help books suffer from.
All in all, decent stuff to read, and in a language which is pretty easy. A good start for beginners.


text:
What Christchurch did next
The city that refused to be flattened by disaster
Introduction: The city that refused to be flattened by disaster
Beneath the Pacific Ocean, rocks on opposing sides of a 'strike-slip' fault had slid past one another with insidious force – quite literally causing a 'tear' in the earth's surface. The tear was so cataclysmic, and so close in succession to a previously damaging major earthquake event in 2010, that it rendered hundreds of commercial buildings and around 10 000 residential homes unsalvageable. Even more tragic was the loss of life. Wives, husbands, sons and daughters. 185 lives. 185 stories.
Six years on from 2011, Aurecon has curated some of these collective stories into a unique reflection. Although each has been born out of disaster, they are also incredible tales of resilience, renewed strength and hope for a brighter future. These stories now form part of the story of Christchurch as it reclaims its destiny.
Christchurch and its people, community, and businesses refused to be flattened.
Rebuilding central Christchurch is one of the most ambitious projects in New Zealand's history and is about recreating and planning for a new, resilient community. It is not an engineering project. It is a rebuild that focuses on the creation of infrastructure and places for Christchurch's people and the stories that bind them together.
Aurecon is proud to be playing its part in this rebuild.
By sharing these stories and engaging with global communities about lessons learned, we hope to contribute to global conversations about disaster resilience.
This is what Christchurch did next…
Learning from a 'global' community
Lianne Dalziel, Mayor – Christchurch Council, talks about how Christchurch is learning from a 'global' community.
Recovery and rebuild – the key players
Recovery:
Urban Search and Rescue (USAR)
Rebuild:
Christchurch City Council
Canterbury Earthquake Recovery Authority (CERA)*
Christchurch Central Development Unit (CCDU)
Stronger Christchurch Infrastructure Rebuild Team (SCIRT)
CERA's Significant Buildings Unit (SBU)
*CERA completed their recovery work in early 2016, handing over to Regenerate Christchurch. Jointly owned and funded by the Crown and the Christchurch City Council, their focus is on development in Christchurch's central city, residential red zones and New Brighton. Regenerate Christchurch will be in existence until June 2021 and then transition into a solely council-owned organisation.
DOWNLOAD: What Christchurch did next (20 MB)
Chapter 1: A city thrown into crisis
Chapter 2: Protecting our community
Chapter 3: Formulating a vision for the future
Chapter 4: Confidence after crisis
Chapter 5: The community connection
Chapter 6: An accessible city
Chapter 7: Our future is strong
Jan Kupec
Risk and Resilience Advisory – Christchurch
Alistair Greig
Infrastructure Leader, South Island, NZ
Email Alistair


Silvermine Pop-Up Opening Reception March 25. Exhibit up through April 8.
Silvermine Pop-Up Opening Reception March 25. Exhibit up through April 8.At Silvermine Art Center with my Sycamore Shadow Parts triptych--three photos of reflections of a particular Sycamore tree that leans over the Sparkill Creek. A blend of my water and car reflections! Photo by Robert Sachs.


text:
Difference between revisions of "Luthra & Luthra"
From Legallypedia
Kianganz (talk | contribs)
m (numbers updated)
Revision as of 17:22, 8 December 2010 (edit) (undo)
Mohit Singh (talk | contribs)
[[File:Luthra & Luthra.jpeg|200px|thumb|right|Luthra & Luthra]]
'''Luthra & Luthra Law Offices''' is an Indian law firm with offices in Delhi, Mumbai and Bangalore. Its founder and managing partner is Rajiv Luthra, while Mohit Saraf is one of the firm's senior partner also responsible for management of the firm.
File:Luthra & Luthra.jpeg
Luthra & Luthra
Luthra & Luthra Law Offices is an Indian law firm with offices in Delhi, Mumbai and Bangalore. Its founder and managing partner is Rajiv Luthra, while Mohit Saraf is one of the firm's senior partner also responsible for management of the firm.
The firm has 31 partners and over 200 lawyers, according to data provided by the firm as at 1 September 2010.
This article is a stub and does not yet contain enough useful information. Help Legallypedia by expanding it!
1 Recruitment information
1.1 Delhi office
1.2 Mumbai office
1.3 Bangalore office
1.4 Contact details
2 RSG India says
4 Related Pages
Mumbai office
Bangalore office
RSG India says
"Benefiting from India's infrastructure boom, the firm acted on more project finance deals by value than any other firm globally in 2009. In addition to its top level finance work, the firm also has full corporate practice known for its quality. The firm is Delhi-based and the absence of top partners in Mumbai means its profile suffers to some degree. Like many of the top firms, clients say they need the managing partner, Rajiv Luthra, on complex matters."<ref>http://rsg-india.com/indian-law-firms/profiles/luthra-luthra RSG India profile 2010</ref>
Indian law firms
Salary table
Retrieved from "https://www.legallyindia.com/w/index.php?title=Luthra_%26_Luthra&oldid=1997"


text:
https://www.wsj.com/articles/obamas-stock-market-legacy-is-hard-to-beat-1484845684
Obama's Stock Market Legacy Is Hard to Beat
U.S. stocks delivered far better returns under Mr. Obama than almost any previous president, and the performance was well ahead of the rest of the world
Traders work on the New York Stock Exchange in November as a television shows President Barack Obama during a news conference. Since Mr. Obama's took office in 2009, U.S. stocks, including dividends, have returned an average of 16.3% a year.
Photo: brendan mcdermid/Reuters
@jmackin2
james.mackintosh@wsj.com
Updated Jan. 21, 2017 10:22 am ET
After eight years in office, Barack Obama has a market record any red-blooded American capitalist could be proud of. U.S. shares have soared, oil prices have come down, borrowing is cheap and profits are up along with the dollar. Even those who bet against President Obama made good money, with returns from gold and bonds better than those delivered by shares under his predecessor, George W. Bush.
These aren't achievements likely to cut much ice with the Democratic Party, and the perception that the rich got richer at the expense of American workers surely helped Donald Trump, who has promised to dismantle Mr. Obama's flagship policies after he is inaugurated as president on Friday.
Historians, economists and politicians will clash for years over the Obama legacy. But for investors, it has been a great time to bet on America. U.S. stocks delivered far better returns under Mr. Obama than almost any previous president; performance was also well ahead of the rest of the world.
"Despite the fact that the economy's been punk, corporate profits became the largest percentage of GDP ever in this cycle," said Richard Bernstein, chief executive of fund manager Richard Bernstein Advisors. "You can talk about whether that's social justice or not but that's not my day job."
With one day of his presidency to go, the S&P 500 was up 182% from Mr. Obama's inauguration in January 2009, delivering an annualized return including dividends of 16.3%. In data since 1928, only Bill Clinton produced higher returns. And, if lower inflation under Mr. Obama is taken into account, the real gap is tiny.
John Bilton, global head of multiasset strategy at J.P. Morgan Asset Management, says the main cause of this equity boom was the geyser of money sprayed at the markets by the U.S. Federal Reserve.
"It's more I would say the Federal Reserve's legacy that's given us this period of performance," he said. "It's been a phenomenal time to be an investor."
Others give Mr. Obama more credit, particularly for the tax cuts and spending of the Recovery Act in 2009, but also for resisting pressure to tighten fiscal policy more quickly and leaving the Fed alone.
"The important economic intervention he did was right at the beginning," said Eric Lonergan, a fund manager at M&G Investments. "And after that he did nothing to disrupt loose monetary and fiscal policy. He could have done a lot of stupid things that he didn't do."
The stunning investment returns under Mr. Obama owe a lot to the luck of his timing. He came to office in the midst of the worst recession in generations, when shares were cheap. While prices can always fall further, the 56% peak-to-trough plunge he inherited set a solid base for gains once the recovery began.
While Mr. Obama might not get much credit for the boom, investors who listened to him would have done particularly well. In March 2009, just a week before stocks hit bottom, the new president gave the most contrarian investment advice possible: buy shares.
"Profit and earning ratios are starting to get to the point where buying stocks is a potentially good deal if you've got a long-term perspective on it," he said. He was right. Anyone who bought and held the S&P 500 based on his comments rode one of the biggest bull markets in history, more than tripling their money even before dividends.
Financial Crisis, Regulatory Agenda Shaped Obama's Economic Legacy
Donald Trump's Cabinet Selections Signal Deregulation Moves Are Coming
Mr. Obama's record is slightly less stellar when taken from the 2008 election, because the market's post-Lehman's crash was under way. From his election to Wednesday's close, the S&P rose 10.4% a year, a gain beaten by Presidents Dwight Eisenhower, Bill Clinton and George H.W. Bush (although again after inflation Mr. Obama would look better).
Markets are forward-looking, so it makes sense to think the effect of the president would be priced in before he takes office. The big rally since Mr. Trump was elected in November has been predicated on investor hope that he will deliver big tax cuts and fiscal stimulus.
Even if Mr. Trump sticks to investor-friendly policies, though, it is highly unlikely he will beat the market record of Mr. Obama's time in office, purely because of the starting point. U.S. stocks are far from cheap, and on many valuation measures are already very expensive, while profits are high by historic standards.
Faster economic growth would surely help shares, but it is hard to see how either profits or valuations could grow enough to deliver annual returns of 16% a year for the next presidential term without either a leap in inflation or a gigantic share price bubble, both best avoided.
Investors might not like that news, but Mr. Trump should be unconcerned. His legacy will only be judged by the value of the stock market if it crashes.
Harry Truman served as U.S. president from 1945 to 1953. An earlier version of this article included a chart that incorrectly said his presidency ended in 1957.
Write to James Mackintosh at James.Mackintosh@wsj.com
Appeared in the January 20, 2017, print edition as 'Obama's Run Will Be Tough to Beat.'


text:
Q: encode image to base64 is not equal to original I am trying to encode/decode an image view and I looked at more than 50 examples but it still does´t work.
I did a simple thing to start with:
1) i am using the simple base 64 data from http://codebeautify.org/base64-to-image-converter#
2) i put it into a blob field of a mysql db (hosted in a remote server)
3) in android I get it correctly via a web service, decode it and show in an image view
public static Bitmap decodeBase64(String input)
{
    byte[] decodedByte = Base64.decode(input.getBytes(), Base64.DEFAULT);
    return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);
}

(so far so good)
4) i am encoding what is in the image view (placed in step 3) and generate a base64 code using
    imageGrupo.buildDrawingCache();
    Bitmap bitmap = imageGrupo.getDrawingCache();
    ByteArrayOutputStream stream=new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.PNG, 90, stream);
    byte[] image=stream.toByteArray();
    finalImagemStr = Base64.encodeToString(image, 0);

5) if i compare the generated base64 with the one I received in 3 they are not the same.
They should be right?
6) when placing the base64 string generated in 4) in the remote database and reading it again it says
  java.lang.IllegalArgumentException: bad base-64

I am going crazy at this point... Any ideas?
Thanks
Regards

A: Try my solution which explains how to encode bitmap to base64 and decode base64 back to bitmap successfully. You can skip the scale image part of the code if you require the exact original image.

A: Base64 was way too long text and wasn't able to fit in my log console, and I spent an hour working on that why not working, it turn out that the generated texts were same but it didnt output the whole text, and only the part of it, this might be the case here
update to OP's code request
thats the method I use currently, it is solid and working without any problem.
public static String bitmapToBase64(Bitmap bitmap) {
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 30, byteArrayOutputStream);
    byte[] byteArray = byteArrayOutputStream.toByteArray();
    String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);

    return encoded;
}

To make sure you are getting the 'safe' Bitmap from the imageView, getDrawableCache is tricky. Use this.
public static Bitmap loadBitmapFromView(View v) {
    Bitmap b = Bitmap.createBitmap( v.getLayoutParams().width, v.getLayoutParams().height, Bitmap.Config.ARGB_8888);
    Canvas c = new Canvas(b);
    v.layout(0, 0, v.getLayoutParams().width, v.getLayoutParams().height);
    v.draw(c);
    return b;
}

A: I don't understand why do you encode and decode again when you already have the bitmap.
And by the way in PNG format the 90 is ignored in the "compress" method.

A: This solution worked for me I just changed Base64.DEFAULT to Base64.NO_WRAP
The output will be the same as if you use an online converter like http://freeonlinetools24.com/base64-image
private String encodeFileToBase64(String filePath)
{
    InputStream inputStream = new FileInputStream(filePath);//You can get an inputStream using any IO API
    byte[] bytes;
    byte[] buffer = new byte[8192];
    int bytesRead;
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    try {
        while ((bytesRead = inputStream.read(buffer)) != -1) {
        output.write(buffer, 0, bytesRead);
    }
    } catch (IOException e) {
    e.printStackTrace();
    }
    bytes = output.toByteArray();
    return Base64.encodeToString(bytes, Base64.NO_WRAP);
}

Decode:
byte[] data = Base64.decode(base64, Base64.NO_WRAP);

redpajama_set_name: RedPajamaStackExchange


Don't let an accident that left you seriously injured go compensated. Get every penny you're owed by working with a Malden personal injury attorney.
Suffering a significant injury is stressful enough on its own, but sometimes the aftermath can actually be worse. Whether you're dealing with unforeseen medical bills or lost income from missing time at work while you recover, the last thing you need is an extended legal battle over the financial compensation you're rightfully owed.
That's why so many Massachusetts residents turn to Joel H. Schwartz, PC when they get injured in an accident caused by someone else's negligence. Working with a Malden personal injury lawyer will allow you to recover the full value of your claim while protecting all of your legal rights.
Every personal injury case is unique and must be approached with that in mind. However, there are a number of accident types that are more commonly seen than others.
Understanding which of these categories your case falls within will help your injury lawyer investigate what happened. For example, a malpractice claim might require an investigation into the doctor's training, while a car accident might require requesting cell phone records to determine if the other driver was distracted at the time of the crash.
Traffic Accidents – Motor vehicle collisions can involve everything from cars and motorcycles to semi-trucks. The other driver, a business, or even a government entity could be at fault depending on the specifics of the crash.
Medical Malpractice – if you suffered an injury while under the care of a healthcare provider, you have the right to seek compensation for their negligence.
Slip-and-Fall Accidents – All property owners have a responsibility to maintain their grounds to safe standards. From slippery floors to stairwells in disrepair, if you were injured due to a slip-and-fall, the property owner can be held liable.
Defective Products – Before a product can be released to the public, it must be free of dangerous defects. An injury caused by a manufacturer's negligence means that you have the right to seek damages.
The amount of compensation you are eligible for will depend directly on the nature of your injury. The medical care required by your recovery, how long you'll be injured for, and the negative impact on your quality of life all need to be considered.
Your Malden injury attorney will ensure that your future needs are included in your compensation—not just your current losses. Getting you the funds you need to make a complete recovery and put the accident behind you will be our primary objective from the moment we start work on your case.
If you were injured in an accident caused by someone else's negligence, filing a personal injury claim could provide you with the compensation needed to make the fullest recovery possible.
Don't try to tackle the process alone, however. Joel H. Schwartz, PC, is standing by and ready to help you build a compelling case and successfully resolve your claim. Schedule a free consultation with a Malden personal injury lawyer today by calling 1-800-660-2270 or by completing the form below.


text:
package cleanup

import (
	"fmt"
)

const (
	KubeVirtTestLabelPrefix = "test.kubevirt.io"
)

// TestLabelForNamespace is used to mark non-namespaces resources with a label bound to a test namespace.
// This will be used to clean up non-namespaced resources after a test case was executed.
func TestLabelForNamespace(namespace string) string {
	return fmt.Sprintf("%s/%s", KubeVirtTestLabelPrefix, namespace)
}

redpajama_set_name: RedPajamaGithub