ElvThis category is to ask questions about Elv.https://oss.deltares.nl/c/message_boards/find_category?p_l_id=3228466&mbCategoryId=32950822021-05-16T10:16:46Z2021-05-16T10:16:46ZRE: Error when modelling with mixed sedimentsVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=39390552021-03-28T13:23:24Z2021-03-28T13:23:24ZHi Bas, <br />Great to know that you are using Elv! The error message indicates that the bed level is below the lowest level of the substrate. The lowest level of the substrate is the bed level minus the sum of all the substrate layers. Worded differently, the error message indicates that the thickness of all substrate layers at one point is 0. If, for instance, initially you have 10 substrate layers of 0.5 m plus the active layer of 1 m, in total you have a 6 m substrate. In this example, if somewhere you degrade more than 6 m: ERROR. <br />It is strange that you say that the error appears where a sedimentation wave arises. As explained above, the error is related to excessive erosion. There must be erosion somewhere.If this happens in the first time step it indicates that from the start there is a huge amount of erosion. That is problematic and probably unreallistic. The first question I have is: are you solving steady or unsteady flow? If it is unsteady, maybe the initial flow condition is causing the large erosion. In this case, yu could consider using 'input.mor.Tstart' for preventing morpodynamic update during the start of the simulation (i.e, spin-up). <br />If flow is steady, there is no initial flow condition. Then, it must be related to the schematization. Indeed, by using input.mor.ThUnLyrEnd you can create a very thick last layer for preventing the error. I would suggest that you use an extreme value (1000?) just for computing a few time steps and be able to plot the output. Then we can see what is going on. There is no computational extra cost for having a very thick last layer, so it is always a good idea to have a thick one. It will not prevent the results being unreallistic, but it will allow you to prevent the crash and see what is going on. <br />How is your flow? Do you impose a constant discharge or a hydrograph? How large is your space step? If you impose a hydrograph with a small time step, expect some issues to arise. Let me know and we discuss it. <br />Regards, <br /><br />VVictor Chavarrias2021-03-28T13:23:24ZError when modelling with mixed sedimentsBas Gradussenhttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=39354852021-03-26T16:30:21Z2021-03-26T16:24:07ZHi!<br />I am studying the morphodynamic effects after widening a certain reach. Directly after the first time step, I get the following error:<br />'You are getting close to the centre of the earth since you run out of substrate material. Ask V about input.mor.ThUnLyrEnd to solve this problem. Come with coffee please <img alt="emoticon" src="https://oss.deltares.nl/o/deltares-dsd-theme.war/images/emoticons/happy.gif" >'.<br /><br />Unfortunately no real-life coffee for now <img alt="emoticon" src="https://oss.deltares.nl/o/deltares-dsd-theme.war/images/emoticons/sad.gif" ><br /><br />The location where the Ls of the top-substrate layer approaches 0 is the same location where a sedimentation shock wave rises. I believe this is a common error (based on a previous conversation with Liselot). What is happening here? Is - at the location where we observe the sedimentation shock wave - a new substrate layer created on top of the previous top-substrate layer for which a very small Ls is registered and it therefore looks like the new top-substrate layer is almost fully eroded? Is there a way we can solve this (using input.mor.ThUnLyrEnd maybe)?<br /><br />Best!<br /><br />Bas Gradussen <br /><br />Edit: I tried running with input.mor.ThUnLyrEnd = 4 (2 times input.mor.ThUnLyr). This did not solve the problem.Bas Gradussen2021-03-26T16:24:07ZInitial bed with a certain shapeVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=35637912020-11-23T11:23:17Z2020-11-23T11:23:16ZHi Hermjan, The best way to specify a gaussian curve as initial condition it is to use a free initial condition and specify the bed level:<div class="lfr-code"><table><tbody><tr><td class="line-numbers" data-line-number="1"></td><td class="lines"><div class="line">q=2;</div></td></tr><tr><td class="line-numbers" data-line-number="2"></td><td class="lines"><div class="line">sig=150;</div></td></tr><tr><td class="line-numbers" data-line-number="3"></td><td class="lines"><div class="line">mu=600;</div></td></tr><tr><td class="line-numbers" data-line-number="4"></td><td class="lines"><div class="line">etab_max=2;</div></td></tr><tr><td class="line-numbers" data-line-number="5"></td><td class="lines"><div class="line">etaw=4;</div></td></tr></tbody></table></div><div class="lfr-code"><table><tbody><tr><td class="line-numbers" data-line-number="1"></td><td class="lines"><div class="line">x=input.grd.dx-input.grd.dx/2:input.grd.dx:input.grd.L-input.grd.dx/2;</div></td></tr><tr><td class="line-numbers" data-line-number="2"></td><td class="lines"><div class="line">etab=etab_max*exp(-(x-mu).^2/sig^2);</div></td></tr><tr><td class="line-numbers" data-line-number="3"></td><td class="lines"><div class="line">h=etaw-etab;</div></td></tr></tbody></table></div><div class="lfr-code"><table><tbody><tr><td class="line-numbers" data-line-number="1"></td><td class="lines"><div class="line">input.ini.initype=2; </div></td></tr><tr><td class="line-numbers" data-line-number="2"></td><td class="lines"><div class="line">input.ini.u=q./h; </div></td></tr><tr><td class="line-numbers" data-line-number="3"></td><td class="lines"><div class="line">input.ini.h=h; </div></td></tr><tr><td class="line-numbers" data-line-number="4"></td><td class="lines"><div class="line">input.ini.etab=etab; </div></td></tr></tbody></table></div>Victor Chavarrias2020-11-23T11:23:16ZRE: No convergence in ELV for backwater computationVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=35435592021-01-05T08:27:20Z2020-11-13T19:56:04ZHi Hermjan, <br />There are several backwater solvers which vary in accuracy (1st or 4th order) and in variable solved (energy or flow depth). There are some minor details for chosing one or another one, but all of them should provide you with a good solution. The fact that a solution is not found is a symptom that a hypothesis underlying the application of a backwater solver is not fullfiled. <br />Concerning theta in the quasi-steady and unsteady solvers. The system of equations solved is fundamentally different in each case. Essentially, one has two unkonws in space and one in time and the other only one in time and two in space. Hence, the numerical scheme that solves one system of equations does not need to be valid to solve the other one. In particular, a fully implicit time integration is required for the quasi-steady scheme to be stable, while the unsteady scheme is stable with half implicit half explicit and one gains a second order accuracy. <br />Before running a morphodynamic simulation, I would test that the hydrodynamics are correct. To this end, I would recommend you to conduct a convergence study. Simply decrease the grid size and check whether the solution converges. This will also tell you how fast does it converge (i.e., order of accuracy) and it is an essential step to firmly decide on the necessary space step for your simulation. Furthermore, I would recommend that you compare with an analytical solution such as the propagation of a Gaussian flood wave. Once the hydrodynamics are clear and beyond doubt, next step is including morphodynamics. Otherwise, one is never sure if the results are genuine or the spurious due to poor numerics. Victor Chavarrias2020-11-13T19:56:04ZRE: No convergence in ELV for backwater computationVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=35415732021-01-05T08:27:20Z2020-11-13T04:27:26ZBijzonder... The steady model should be the most robust one, as it solved an ODE, contrary to the quasi-steady and unsteady, which solve a PDE. The flow initial condition is irrelevant in the case of the steady model. Only the initial bed level and the downstream flow boundary condition matter. I guess there is an issue with the downstream boundary condition. What are you imposing? Copy paste the log-file that the model generates. Victor Chavarrias2020-11-13T04:27:26ZRE: No convergence in ELV for backwater computationHermjan Barneveldhttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=35406082021-01-05T08:27:20Z2020-11-12T16:04:24ZSorry, I meant the steady model doesn't start (I keep up mixing up the definitions of the models). Unsteady model and quasi-steady model (with same initial conditions as for the steady model) do start.Hermjan Barneveld2020-11-12T16:04:24ZRE: No convergence in ELV for backwater computationVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=35340812021-01-05T08:27:20Z2020-11-10T15:04:30ZThe quasi-steady model does not solve the backwater equation. If there is no convergence in the first time step is because the initial condition is not accurate enough. Victor Chavarrias2020-11-10T15:04:30ZNo convergence in ELV for backwater computationHermjan Barneveldhttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=35340712021-01-05T08:27:20Z2020-11-10T15:00:20ZI tried to start identical simulations (also identical initial conditions) with the steady model, quasi-steady model and unsteady model. The quasi-steady model doesn't start (no convergence in 1st time step). The other models do run. Time step reduction doesn't help. Any idea why the computation of the backwater curve seems to be more sensitive and any suggestions to solve it?Hermjan Barneveld2020-11-10T15:00:20ZRE: ELV downstream normal flow condition, further to previous answerVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34665642021-01-05T08:27:51Z2020-10-19T09:51:59ZHi, <br /><br />If in both cases the intial condition you impose is normal flow and the discharge remains steady, I see no reason for finding strong erosion in one case and not in the other one. If the discharge is unsteady (it is wise to first make a run with steady discharge to check that boundary conditions behave as you want), does erosion occur before the wave gets to the dowsntream end? If yes, it seems that the initial condition is not normal flow in the case of extreme erosion. Check the bed level of the most dowsntream location. You have to adapt this to both cases. Victor Chavarrias2020-10-19T09:51:59ZRE: modelling concepts in ELVVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34625032021-01-05T08:28:16Z2020-10-17T18:28:50ZHi, <br /><br />There was a bug that I have just solved. The Exner equation is solved differentely for unsteady flow than for steady flow. This is because in the case of unsteady flow, flow can change direction, while it cannot if it is steady. The quasi-steady case was not dealt with. Victor Chavarrias2020-10-17T18:28:50Zmodelling concepts in ELVHermjan Barneveldhttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34536032021-01-05T08:28:16Z2020-10-15T10:24:29ZRunning a simple simulation with quasi-steady model approach (input.mdv.flowtype=2) : constant discharge upstream, constant water level downstream, still doesn't work. It gives following Warning: the power of the excess shield should be the same in the sediment transport relation than in the entrainement formulation. Otherwise tt may create a discontinuity in Dk because it is 0 when Qbk_st is 0 but it may cancel with the term in Ek_st <br />And ends with ¡¡ ERROR !! <br />Supposedly you do not end up here in bed_level_update, at line 137 <br />Same simulation with input.mdv.flowtype=4 (onlu change in input) does start, although it gives the same warning. Any idea/tip?Hermjan Barneveld2020-10-15T10:24:29ZELV downstream normal flow condition, further to previous answerHermjan Barneveldhttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34499622021-01-05T08:27:51Z2020-10-13T22:07:42ZWith input.ini.initype=2 and input.bch.dotype=3 I get in one simulation a stable downstream boundary (stable bed) and in another simulation with much steeper slope (0.001), strong erosion (tens of meters) at the downstream boundary. Any idea? <br />Should I in this case better define a downstream water level as a function of time? Hermjan Barneveld2020-10-13T22:07:42ZRE: ELV modelling concepts availableVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34497962020-10-14T09:03:43Z2020-10-13T19:55:23ZHi Hermjan, <br /><br />In Battjes and Labeur, both the quasi-steady system of equations (Equations 8.1 and 8.2) and the diffusive equation (Equation 8.17) are presented. Elv solves the quasi-steady system of equations. You can see this in the terms present in function 'preissman'. Victor Chavarrias2020-10-13T19:55:23ZRE: ELV modelling concepts availableVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34497912020-10-13T19:53:04Z2020-10-13T19:52:03Z[From Hermjan]Hi Victor,<br />Thanks for your answer<br /> I donot understand yet. Does Elv solve the equation given in Batjes and Labeur? That would in my opinion be the same as what I adopted. Anyway I did not succeed to run a quasi-steady simulation. <br /><br />Thanks again and with best regard.<br /><br />HermjanVictor Chavarrias2020-10-13T19:52:03ZRE: ELV modelling concepts availableVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34456072020-10-12T10:33:41Z2020-10-12T10:33:41ZHi Hermjan, <br /><br />Indeed, you call diffusive to what I call quasi-stedy. Still, it is not the same. The diffusive wave equation is found further assuming small water slope after assuming quasi-steady. In Elv you solve the quasi-steady set of equations and not the diffusive wave equation. Victor Chavarrias2020-10-12T10:33:41ZBatch simulationsVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34406702020-10-09T11:11:45Z2020-10-09T11:11:45ZHi, <br /><br />I have received the following questions:<br /><br /><ul style="list-style: disc outside;"><li><em>Can I perform a simulation directly by using an input.mat? </em></li><li><em>Can I make a new input file directly (new input.mat) using an old one? This might be easier that changing (and storing under a different name) input_ELV every time.<br /></em></li><li><em>Can I perform multiple simulations (batching)? I thought single_run_ELV might be used for that as a base. But couldn’t figure that out. Do you have a sample input/script?</em></li></ul><em></em><br />I have done it before, but the code has evolved and I have not updated these scripts, so my old scripts will not work. It is simple. <br /><ol style="list-style: decimal outside;" start="1"><li>Create a reference input file (i.e., 'input_ELV.m'). </li><li>Save the input variable (i.e., 'input.mat') or run the simulation for this to be done automatically.</li><li>Create a script modifying script 'oh_ELV_please_run'. Make it to load the reference input variable, and change the parameters you want to change before calling 'run_ELV'. </li></ol>Victor Chavarrias2020-10-09T11:11:45ZThe value I set at the boundary is not what I see in the plotVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34406212020-10-09T11:02:03Z2020-10-09T11:02:03ZI have received the following question:<br /><em>Why is the sediment transport for [simulations] 002 and 003 at upstream boundary not constant and exactly 8e-5 m2/s [although this is the value I specify]? </em><br /><em></em><br />The reason is that the value applied as boundary condition is applied at the cell edge while the value in the output is at cell centre. Victor Chavarrias2020-10-09T11:02:03Zinitype 4Victor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34406142020-10-09T10:59:52Z2020-10-09T10:59:52ZHi, <br /><br />There has been the following question:<br /><em>Apparantly the combination with input.ini.initype=4 is not working. Can you explain this? Why does input.ini.initype=4 overrule some settings?</em><br />I thought initype=4 for situations in which I wanted to automatically cpmpute the boundary conditions that would match an initial condition. The upstream sediment load and dowsntream water level are copmuted to keep equilibrium. Hence, they remain constant. For this reason, whatever thing you put as boundary is overwriten (and a warning appears in the log-file).Victor Chavarrias2020-10-09T10:59:52ZRE: ELV modelling concepts availableVictor Chavarriashttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34406092020-10-09T12:14:00Z2020-10-09T10:54:26ZHi, <br /><br />The same time step is applied in both morphodynamics and hydrodynamics for all flow solvers. Hence, also when the backwater curve is solved (i.e.,. steady flow). Ever time step, a new backwater curve is solved using the boundary conditions (discharge and water level) at that time. Hence, the water discharge can vary with time. <br /><br />The documentation of Elv is basically stored in my mind, sorry for that <img alt="emoticon" src="https://oss.deltares.nl/o/deltares-dsd-theme.war/images/emoticons/happy.gif" >. On the other hand, the code is sufficiently accessible for easily inspect the routines to check what exactly is going on. Quasi-steady means that the flow is not fully steady (i.e., backwater curve) nor fully unsteady (i.e., Saint-Venant (1871) equations). The time derivative of the continuity equation is considered, but the time derivative of the momentum equation is neglected. The best book explaining this is (in my view) that of <a href="https://www.cambridge.org/core/books/unsteady-flow-in-open-channels/5CCE099F37BCC5AF4E67B35F15666E7B">Battjes and Labeur</a>. Check the lecture notes of TUDelft in case you do not have the book. The solver is in function 'preissmann'. It is not the simplest to understand. All possible tricks to speed it up where used <img alt="emoticon" src="https://oss.deltares.nl/o/deltares-dsd-theme.war/images/emoticons/happy.gif" >. Victor Chavarrias2020-10-09T10:54:26ZELV modelling concepts availableHermjan Barneveldhttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=3228466&messageId=34402592020-10-09T10:55:50Z2020-10-09T08:34:46ZIn Elv following options for models exist:<br />1=steady; 2=quasi-steady; 3=unsteady (explicit); 4=unsteady (implicit);<br />I use 4 up to now for the full dynamic model (all terms included). I want to apply simplified models but want to check what they mean:<ol style="list-style: decimal outside;" start="1"><li>in steady the backwater is calculated every time-step? The discharge can vary in time</li><li>quasi-steady means diffusive wave? Where can I find which terms in the equations are included/neglected?</li></ol>Hermjan Barneveld2020-10-09T08:34:46Z