%letter

\documentclass[a4paper, 10pt]{article}
%
%----------------------------
%---------PACKAGES-----------
%----------------------------
%
%---------spanish
%\usepackage[latin1]{inputenc}
%\usepackage[spanish, es-tabla]{babel}
%
%
%---------others
%\usepackage{booktabs}
%\usepackage{epigraph} %Epigrafes 
\usepackage{eurosym} %euro symbol
\usepackage[hyphens]{url}
\usepackage{enumitem}
%\usepackage{pdfpages} %para incluir pdf como anejos
\usepackage{natbib} %references
%\usepackage{array} %math arrays
\usepackage{amsmath} %math matrices
\usepackage{cancel} %cancel term in equation
\usepackage{siunitx}
%\usepackage{fancyhdr}
\usepackage{authblk} %affiliations
%
%
%---------figures
\usepackage{graphics}
\usepackage{graphicx}
%\usepackage{wrapfig} % Allows in-line images ?
\usepackage{color}
%\usepackage{amsmath}
%\usepackage{subfigure}
%\usepackage[section]{placeins}
%\usepackage[section,subsection,subsubsection]{extraplaceins}
%
%
%---------external references
\usepackage{xr}
\externaldocument[p-]{d:/checkouts/20161020_ellipticity_check/doc/report_2/ell2D}
%
%
%---------tables
%\usepackage{multirow} %columns spaning multiple rows
%\usepackage{multicol} %rows spaning multiple columns
%
%
%---------minitoc for table of content in every chapter
%\usepackage{minitoc} 
%\ProvidesFile{spanish.mld}[1999/03/16]
%% Spanish titles for minitoc.sty
%\def\mtctitle{\'Indice General}%	
%\def\mlftitle{\'Indice de Figuras}%
%\def\mlttitle{\'Indice de Tablas}%
%\def\ptctitle{\'Indice General}%
%\def\plftitle{\'Indice de Figuras}%
%\def\plttitle{\'Indice de Tablas}%
%\def\stctitle{\'Indice General}%
%\def\slftitle{\'Indice de Figuras}%
%\def\slttitle{\'Indice de Tablas}%
%
%
%
%----------------------------
%---------NEW COMMANDS
%----------------------------
%
%\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
%\addto\captionsspanish{\renewcommand{\chaptername}{}}
\setlength{\parindent}{0pt}
%
%
%
%----------------------------
%---------PATHS
%----------------------------
%
%\graphicspath{{C:/Users/Victor/Dropbox/PFC/vial_alguaire/proyecto/imagenes/}} %TOSH
%\graphicspath{{D:/victorchavarri/Dropbox/PFC/vial_alguaire/proyecto/imagenes/}} %TUD
%
%
%
%----------------------------
%---------HEADER
%----------------------------
%
%\pagestyle{fancy}
%\fancyhead[L]{\small Sediment sorting in modeling sediment management measures}
%\fancyhead[R]{\small V. Chavarr\'ias}
%
%
%
%----------------------------
%---------TITLE
%----------------------------
%
%OPTION 1
%\title{
%\null
%\vfill
%\begin{flushright}
%\huge{Accounting for sediment sorting in modeling sediment management measures}\\
%\vspace{5mm}
%\Large{Workplan}\\
%\vspace{5mm}
%\normalsize{ 
%\begin{tabular}{lr} %anyadir \quad a la formula mas larga
    %Author:    	& V. Chavarr\'ias\\
    %Supervisor: & Dr. Ir. A. Blom\\
%\end{tabular}
 %}
%\end{flushright}
%}
%
%\date{}
%\author{}
%
%OPTION 2
\title{
\begin{center}
\huge{Reply to Ralph's Comments}\\
\vspace{5mm}
\large{Ill-posedness in 2D Mixed Sediment River Morphodynamics}
\smallskip
\end{center}
}

\author[1]{V.\ Chavarr\'ias \thanks{Corresponding author: \ttfamily{v.chavarriasborras@tudelft.nl}}}
%\author[2,3]{G.\ Stecca}
%\author[1]{A.\ Blom}

\affil[1]{\small{Faculty of Civil Engineering and Geosciences, Delft University of Technology, Delft, The Netherlands.}}
%\affil[2]{\small{National Institute of Water and Atmospheric Research, Christchurch, New Zealand.}}
%\affil[3]{\small{University of Trento, Trento, Italy.}}

%%
%\author[tud]{V\'ictor Chavarr\'ias\corref{cor1}}
%\ead{v.chavarriasborras@tudelft.nl}
%\author[niwa,ut]{Guglielmo Stecca}
%\author[tud]{Robert Jan Labeur}
%\author[tud]{Astrid Blom}
%
%\cortext[cor1]{Corresponding author}
%
%\address[tud]{Faculty of Civil Engineering and Geosciences, Delft University of Technology, Delft, The Netherlands.}
%\address[niwa]{National Institute of Water and Atmospheric Research, Christchurch, New Zealand.}
%\address[ut]{University of Trento, Trento, Italy.}

\date{\today}


%--------------------------------------------------------------------------
%
\begin{document}
%
%
%----------------------------
%---------COVER
%----------------------------
%
%OPTION 1
%\clearpage %for not having number page in the first page
%\maketitle
%\thispagestyle{empty} %for not having number page in the first page
%\pagebreak
%\tableofcontents
%\pagebreak
%
%
%----------------------------
%---------FIRST PAGE
%----------------------------
%
%OPTION 2
\maketitle
%
%
%BEGIN
%\begin{abstract}
%The objective is to perform a perturbation analysis of the 1 dimensional Saint-Venant model coupled to the Hirano model for mixed sediment considering quasi-steady flow. 
%\end{abstract}
%
%
%
The comments by Ralph are written in italic font whereas my answers are in regular font. 
%
%
%\section{Editor (Dr.\ D'Odorico)}
%
%
\begin{enumerate}

\item\textit{Have you answered research question 1?}\\

I consider that the answer to Research Question 1 (``What is the role of secondary flow and bed slope effects as regards to the mathematical character of the system of equations?'') is given by the first list of bullet points in the Conclusions section which I list at continuation:
\begin{itemize}
\item The current secondary flow model may yield an ill-posed model. This happens with or without considering morphology. 
\item Above a certain threshold of horizontal diffusion in the transport equation for secondary flow the model is well-posed. The threshold may be physically unrealistic. 
\item The effect of bed slope on the sediment transport direction is a necessary mechanism to obtain a well-posed model. 
\item A unisize model is well-posed as regards to bed slope effects independently on the specific closure relation which is used.
\item A mixed-size model may be ill-posed as regards to bed slope effects depending on the specific closure relation which is used. For the simplest case \citep[i.e.][]{Sekine92_1} it is always well-posed.
\end{itemize}

\item\textit{Figure 1: Surprises me: adding Secondary flow stabilizes the system?}\\

I guess that this result surprises because preliminary work points in the opposite direction (Schielen, (2017), personal communication). This is because the preliminary work is conducted assuming equilibrium secondary flow while in this study we consider the advection and diffusion of secondary flow intensity. I think that it would be of interest to study the effect of equilibrium secondary flow compared to the unsteady case. 

I have added this comment to the report.

\item\textit{Relation wave number and wave length? Hence: relation fig 1a and fig 1b. k=2 pi/lam. Just don’t understand.}

The wave number ($k_{wi}$) and wavelength ($l_{wi}$) are related (as you write) by the equation $k_{wi}=\frac{2\pi}{l_{wi}}$ for $i=x,y$. The panels \textbf{a} and \textbf{b} present the same information simply considering wave numbers or wavelengths. This is done because ill-posedness is better assessed in terms of wave numbers but ``bar people'' (river bars, not beer bars) is used to work in terms of wavelengths. Note that Figure 1 is a special case because, as we want to select conditions of bar stability/instability, the vertical axis of panel \textbf{b} is plotted in terms of river width ($B$) rather than wavelength ($B=\frac{\pi}{k_{wy}}$). 

I have clarified this in the report.

\item\textit{Caption figure 2 seems incorrect (and is the same as figure 1)}

Thank you. I have solved it. 

\item\textit{Page 20: here you define ill-posedness, but not in terms of Monge cones like you did previously. I’m not an expert on this. }

In short, the current analysis is more complete and last year's analysis can be considered a particular case of the current analysis. 

A problem is ill-posed if the solution is not continuous for the data. That is, if an infinitesimal perturbation in the data (initial and boundary conditions) causes a finite perturbation in the solution for an arbitrarily small time. (The fact that the time is arbitrarily small excludes deterministic chaos as an ill-posed problem). Assuming a solution of the form of a plane waves, the definition above is translated into a positive growth rate for an infinitely large wavenumber. If for an ever increasing wavenumber the growth rate is positive you would see in numerical simulations than an ever decreasing grid size causes spurious oscillations to grow faster. 

The analysis of last year was based on the approach set by \citep{Courant89_2}, followed by \citep{Sloff92,Sloff93,Sieben94,Sieben97_PhD}. The idea is, neglecting friction and diffusion mechanisms, the system is reduced to the first order matrices ($\mathbf{A_x}$ and $\mathbf{A_y}$ in the NKWK notation). The eigenvalues of all linear combination of these two matrices for unitary vectors in the $x$ and $y$ direction draw the Monge cones. This can be seen as surfaces propagating the information in a 3D space formed by the 2 space dimensions and time. For a fixed time these are closed curves showing until where has the front of a perturbation been propagated in a unitary time. If the characteristic celerity is imaginary, the problem is ill-posed, and the cone does not exists in the real domain. 

This method is quite visual, graphical, and allows for some solutions ``by hand'' that were very useful when computer power was not what it is now. Yet, there are some limitations. When including the effects of friction and diffusion, the behavior of the solution depends on the wave number, and the Monge cones do not give information of this dependence. Thus, we go to a more general perturbation or normal mode analysis as shown in the current NKWK report. Now we can study the behavior of perturbations as a function of the wave number. We do not obtain analytical expressions but we can numerically find the eigenvalues varying the wave number. If we see that, for increasing wave number the growth rate is positive, we are confronting an ill-posed problem. 

If in the current analysis you neglect diffusion and friction terms and you restrict wavenumbers to those combinations whose modulus is 1, you obtain the same result that we showed in last year's project. 

\item\textit{You define ill posedness as that at least one perturbation is positive for an infinite value of the wavenumber. Is this to say: for every wavenumber, the real part of the eigenvalue should be negative. Otherwise, the simulation is ill posed.}

It is not the same. Bars grow because there is a certain domain in the wavenumbers (or wavelengths) space in which the growth rate is positive. Yet, the problem is well-posed because for an infinitely large wavenumber the growth rate is negative. What defines well-posedness is the growth rate for a wave number tending to infinite. 

\item\textit{Then you consider the implementation on a grid. So therefore, you can indeed consider ALL wavenumbers (namely: in practice the maximal wavenumber that fits in the grid). Correct? And as a consequence: grid fining gives no convergence if the problem is ill posed? Correct? Is that also the reason why you consider the boundaries 250 for $k_{wx}$ and $k_{wy}$?}

This is correct. In a numerical simulation the maximal wave number is limited by the grid size. Smaller grid cells imply the consideration of larger wave numbers and, if the problem is ill-posed, oscillations of a larger wave numbers grow faster. This causes the lack of convergence. Indeed I consider a wavenumber equal to 250 \si{rad/m} which is equivalent to a grid of the order of \SI{1}{cm}, which I consider a small value. 

\item\textit{Caption figure 3: I see positive values, yet you state that the problem is well-posed. Is this correct? In all the other figures, I can couple the colors to the state of the simulation (left figures): only green means growth rates smaller than zero means well posedness. Red means positive groth rate and hence ill posedness. Is this correct? (Based on the discussion on the NCR days, I now understand that we only have to look at the k=250 line. If we see ‘red’ on that line, the problem is ill posed. This has to do with the grid resolution and the wave number cut off, right?)}

The caption of Figure 3 had an errata. I apologize. Indeed, the fact that there is red color (growth) does not imply ill-posedness. It is the fact that for the largest wave numbers the color is red what makes it to be ill-posed. 

\item\textit{Can you clearly point out the disctinction between figure 3a and 3b? It should be the same because there is a relation between k and I. But you explained that I actually see something else in figure 3-b, because there you depict the marginal stability curve? So the colors in figure 3a and figure 3b mean something else?}

The information plotted in panel \textbf{a} is the same to the one plotted in panel \textbf{b}. I only rescale the axis. Yet, the axis are very different. In the wave number plot (\textbf{a}) we see the domain for wave numbers between \SI{1}{rad/m} and \SI{250}{rad/m}. This is equivalent to wavelengths between \SI{6.3}{m} and \SI{0.025}{m}. This information, although present in panel \textbf{b}, is compressed in a small part of the plot and invisible in practice. On the other hand, in panel \textbf{b} we can appreciate wavelengths between \SI{1}{m} and \SI{250}{m} which is equivalent to wave numbers between \SI{6.3}{rad/m} and \SI{0.025}{rad/m}. The same happens, the information is plotted in panel \textbf{a} but invisible in practice. 

The two plots are necessary because, while well-posedness or ill-posedness is relevant for short waves (large wave numbers), bar stability is only visible for large waves (small wave numbers). Note that, in panel \textbf{b} there are two red regions. The one on the upper right corner corresponds to bar growth. We observe a critical lateral wavelength to observe growth. The second region around the origin is related to ill-posedness. Please compare Figure 3 to Figure 6. Figure 6 shows a well-posed case, where we see the bar growth domain but not the red domain around the origin.  

\item\textit{Page 22: There is a sentence: Note that bars cannot in such a diffusive case. Something is missing.}

Thank you. I have solved it. The point is we see that bars cannot grow if diffusion due to bed slope effects is extremely large.

\item\textit{Figure 42: You denote the points where in a real case simulation, the last step is ill posed (after 10.00 days). I would also be interested in the collection of locations where the calculation has been ill posed during the calculation (so a kind of incremental collection). Because then you have garbage in means garbage out?}

Thank you. I have added the figure you ask for in the report. One comment: I do not think that the conclusion of ``garbage in, garbage out'' can be done on a node basis. Imagine for instance a situation in which the upstream half of the domain is at some point ill-posed but not the downstream half part of it. This does not mean that the results of the downstream part are credible. Oscillations generated in the upstream part will affect the downstream part. At the same time, the fact that all nodes are at some point are ill-posed does not mean that the solution is useless. The solution becomes subjective and maybe, after careful judgment, something useful can be obtained from such a simulation. In any case, I would definitely avoid such a situation as we have discussed several times. 

\item\textit{Conclusions: What are the consequences of the statement that the DVR simulation suffers from ill-posedness?}

I did not write any conclusion further than saying that we expect the same as in all other ill-posed simulations. I have added the next paragraph at the end of the section:

``The fact that the system of equations is in some nodes and at some point in time ill-posed implies that the solution is subjective and needs to be carefully assessed. First, the fact that the solution has been always well-posed in a certain subdomain does not imply that it does not suffer from the consequences of ill-posedness. This is because perturbations that are generated in the ill-posed part of the domain may travel to parts of the domain that are well-posed. Second, the fact that the solution is at some point ill-posed does not mean that the consequences are appreciable. For instance, if a limited number of nodes become ill-posed for a short time, oscillations may not have time to significantly grow. Third, the solution is grid dependent. A refinement of the grid will not cause convergence of the solution but the opposite (Section 5.1). The difficulty arises in the fact that it is up to the modeler to decide whether the consequences are significant or not and whether the solution is still reasonable and usable to answer the questions for which the model was made.''

I have added to the Conclusions section that due to the ill-posedness of the DVR simulation, spurious oscillations grow and the solution becomes subjective. 

\item\textit{Can you make a list of recommendations?}

Thank you. I have added a recommendations section summarizing the points in the discussion. 

\item\textit{About the discussion: First paragraph: Ok. Second paragraph: You say ‘expect’ and ‘plausible’ and ‘does not seem logical’. Then you say: ... this is independent. Do you here also mean: we expect that etc.\ ? So in other words: how likely are these statements? It would be nice if you can use a kind of continuity argument to show that a different initial stage does not lead to different behavior...}

Thank you. I have tried to improve the paragraph. 

\item\textit{Third paragraph: You state: adding eddy viscosity may have an effect, but most likely does not have a result on the ill posedness. Please clarify. And add this to the list of recommendations?}

The point is that I expect that eddy viscosity will have an effect on ill-posedness due to secondary flow but not on ill-posedness due to mixed-size sediment. I have rewritten the paragraph.

\item\textit{Fourth paragraph: ‘based on empirical insight’? How do you mean?}

What I mean is that we have not proven anything. We have obtained our conclusions observing the ill-posed domain of certain cases. I have changed the text. 

\item\textit{And about the practical cases in numerical simulations: I thought you derived the eigenvalue numerically?}

Yes, the eigenvalues are derived numerically. I have changed the sentence to avoid confusion. 

\item\textit{Fifth paragraph: I don’t really undertsnad your point? Do you mean: problem may be well posed but linearly (and nonlinearly) unstable?}

Yes, what you say is what I mean. The fact that the growth rate is negative only tells you that for an infinite time oscillations will decay. The question is, what is the behavior with time? The crux of the matter is that difference of two (eigen)vectors whose magnitude decrease with time (negative eigenvalue) may increase temporarily. If this temporal growth is too large, the assumption of linearity does not hold. Then, the fact that at a linear level oscillations decay does not say whether oscillations will actually decay. 

This point is a tiny detail, we can discuss it next time. 

\item\textit{Sixth paragraph: ‘The ill posedness indicates etc. Hm, interesting observation. So adding more physics automatically reduces possible ill posedness?}

Not really, but eventually yes. ``Not really'' because it does not matter how good you model, for instance, the flow that if you use the active layer model it can always be ill-posed. So more physics does not imply a smaller domain of ill-posedness. On the other hand, ``eventually yes'' because it is in the lack of physics where ill-posedness has its origin. Eventually, if you include all possible complexity in your model (impossible by definition of model) this will be well-posed because nature is well-posed. 

\item\textit{Seventh paragraph: I don’t get your point...}

I mean that the current routine does not account for diffusive processes. Then I sketch how to extend the routine to account for them. However, the sketch is tentative as it is based on the assumption that the effect of diffusion in the momentum will be similar to that due to secondary flow. 

\item\textit{Eighth paragraph: Ok.}

Thanks. 

\item\textit{Check for: eqaution - equation; proeprly - properly; Nature - nature; A second error is introduces - A second error is introduced}

Thank you. Done. 

\end{enumerate} 
%
%%
% REFERENCES
%%
%
\DeclareRobustCommand{\van}[3]{#3}
\bibliographystyle{agufull08}
\bibliography{references}
%

%
%\begin{figure}
	%\centering
	%\makebox[\textwidth][c]{\includegraphics[width=1.2\textwidth]{../../figures/deltares_3D.png}}%
	%\caption{3D view of Deltares (in red square) and the Water Lab (red arrow).}
	%\label{fig:deltares_3D}
%\end{figure}


\end{document}