Delft3D FLOW Tracer Negative ConcentrationDelft3D FLOW Tracer Negative Concentrationhttps://oss.deltares.nl/c/message_boards/find_thread?p_l_id=1806765&threadId=8220242020-06-03T03:48:06Z2020-06-03T03:48:06ZRE: Delft3D FLOW Tracer Negative ConcentrationAdri Mouritshttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=12478292017-06-06T10:27:32Z2017-06-06T10:27:32ZHi Karoline,<br /><br />Can you please try with a more recent version?<br /><br />Thanks.<br /><br />Regards,<br /><br />AdriAdri Mourits2017-06-06T10:27:32ZRE: Delft3D FLOW Tracer Negative ConcentrationKaroline Wischnewskihttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=12280532017-05-15T15:17:10Z2017-05-15T15:17:10ZHi Adri,<br /><br />my version might not be the newest. We work with FLOW2D3D Version 6.01.07.4015.<br /><br />Can I send the files as a private message?<br /><br />cheers,<br />KarolineKaroline Wischnewski2017-05-15T15:17:10ZRE: Delft3D FLOW Tracer Negative ConcentrationAdri Mouritshttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=12260072017-05-12T18:49:35Z2017-05-12T18:49:35ZHi Karoline,<br /><br />If you start with a concentration of 80, and there are no sources with a higher concentration, then 400 should not appear.<br /><br />Did you try with a recent Delft3D version?<br /><br />Can you zip your complete set of input files (preferably reduced into a simple testcase showing the problem) and attach that to a post on this forum?<br /><br />Thanks.<br /><br />Regards,<br /><br />AdriAdri Mourits2017-05-12T18:49:35ZRE: Delft3D FLOW Tracer Negative ConcentrationKaroline Wischnewskihttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=12128792017-04-26T15:09:50Z2017-04-26T15:09:50ZHi Adri,<br /><br />thanks for the clarification, I already started a run using "high" concentrations and this resulted in new but somewhat related issues.<br /><br />a) (I believe due to diffusion) concentrations still are very small at places, hence I get negative concentrations anyway, which will probably always happen, since i start with zero background concentration and have an input at the very edge of one side of my model domain...so I might have to go the route of adjusting the code to overcome this<br /><br />b) the model creates more particles. My domain is a reservoir with a river inflow. I input my pollutant via the river stream with concentrationsvalues of about 80. And further downstream where I expect everything to be diluted (river about 2m deep, Reservoir about 30m deep and much wider) i see concentrations of 400 and more, how did that happen and how could i fix this?<br /><br />The second issue only was visible in a 2D case i calculated to quickly test some parameter variations (i buildt a 3D version with 15 z-layers), there are no visible "artificial" increases in concentrations in my 3D case, but now I am afraid that the same error might also happen in the 3D case but maybe not so pronounced, that I cannot tell in those results.<br /><br />Any ideas and input would be much appreciated.<br /><br />Thanks KarolineKaroline Wischnewski2017-04-26T15:09:50ZRE: Delft3D FLOW Tracer Negative ConcentrationAdri Mouritshttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=11995342017-04-11T16:53:16Z2017-04-11T16:53:16ZHi Karoline,<br /><br />Tracers are modelled to have no influence on the density; only salinity, temperature and sediments do (optionally). So you can multiply your tracer with a factor (e.g. 1000000) to use the Forester filter properly, and when interpreting the results scale the tracer back to the correct level.<br /><br />Regards,<br /><br />AdriAdri Mourits2017-04-11T16:53:16ZRE: Delft3D FLOW Tracer Negative ConcentrationKaroline Wischnewskihttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=11806292017-03-23T10:05:45Z2017-03-23T10:05:45ZHello Everyone,<br /><br />I just encountered the same problem with negative concentrations in my tracer computations. In my particular case the problem I see is due to my tiny concentrations in the micrograms/l region. Which in turn means, that the vertical forester filter checking for negative concentrations greater than -0.01 will not affect my calculations since my negative concentrations are "small" with only -1e-6. Unfortunately this results in 200% errors sometimes.<br /><br />The option with changing the source code sounds like a good fix but raising computation times does not, since it already is a quite involved big model taking quite long to compute, so now I am wondering what changing the exponent of my concentrations will do to the results. Obviously in real life changing concentrations from microgram to kilogram would have a major impact on the density, but as far as I can tell, the tracer in the model computations does not affect the density of the water parcel, correct? So there should be no difference in the model computations if I just scratch out a few zeros in my input concentrations from lets say 2 microgram/l to 2 kg/l.<br /><br />Could I do that, or would I end up with totaly wrong results appart from the wrong exponent of the concentrations, whcih I could easily fix after?<br /><br />Any tip on this would be highly appreciated!<br /><br />Thanks,<br />KarolineKaroline Wischnewski2017-03-23T10:05:45ZRE: Delft3D FLOW Tracer Negative ConcentrationErik de Goedehttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=10260112016-09-22T15:18:51Z2016-09-22T15:18:51ZHi Andrea (and others),<br /><br />Recently we have looked at your problem and we solved it. There were two issues:<br />1) You observe negative concentrations in a tracer. Your model has steep gradients in the vertical. Due to our central discretization scheme for vertical advection small negative concentrations can occur.***) To suppress this, we have implemented a vertical Forester filter. However, that filter is only applied to salinity and temperature and not to tracers. We changed the Delft3D-FLOW open source code (see Revision 6562 of September 16th), so that the vertical Forester filter is now also used for tracers.<br />2) As my colleague Adri Mourits already stated, the horizontal Forester applies a lower limit of -0.01. This means that small negative concentrations are still possible. If you change subroutine FORFIL.F90 and replace the lower limit of -0.01 into 0.0, then negative concentrations will now longer appear. Noted that this will come at the cost of extra computation time, because more Forester iterations might be needed. For your lake of Geneva model this effect wasn't noticeable.<br /><br />If you use our most recent version and change the code according to 2), then negative concentrations will not appear anymore.<br /><br />***) There are numerical schemes that do not produce negative concentrations. However, these schemes are much more diffusive and probably even inaccurate for our applications in 3D with stratification. <br /><br />With kind regards,<br />Erik de Goede<br />DeltaresErik de Goede2016-09-22T15:18:51ZRE: Delft3D FLOW Tracer Negative ConcentrationAndrea Cimatoribushttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=10029712016-08-23T11:53:07Z2016-08-23T11:53:07ZHi,<br />I am entering the conversation since I am having a somewhat similar problem. The list of evidence I find:<br />- parallel computation in complex geometry, 3D.<br />- I see small (few percent), negative concentrations of pollutants, when I look at vertical profiles of concentration in the map files.<br />- No warnings in the diag files about negative concentrations, but warnings about Courant number<br />- Courant number warnings disappear if I run the simulation on a single CPU, but the negative concentrations in the map file remain there.<br />- Negative concentrations tend to appear deeper in the water column, where vertical resolution is lower.<br />- I increased vertical resolution and vertical diffusivity, partially solving the problem (e.g. I was getting warnings in the diag files too beforehand, and also the regions with negative concentration are smaller).Andrea Cimatoribus2016-08-23T11:53:07ZRE: Delft3D FLOW Tracer Negative ConcentrationAdri Mouritshttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=8258722016-01-29T07:43:53Z2016-01-29T07:43:53ZHi Nill Ng,<br /><br />Concentrations of -0.01 are not negligible compared to 1.0<br /><br />Multiple standalone models, ran at the same time, do not interfere with each other. I can't imagine that this is causing the problem.<br /><br />Are there messages in your tri-diag file indicating that the model is on the edge of being stable?<br /><br />Do the negative concentrations only appear locally? And if so, are the grid sizes there relatively small? Are the velocities there relatively high?<br /><br />I'm still interested in your model input in case you don't find the cause of this problem.<br /><br />Regards,<br /><br />AdriAdri Mourits2016-01-29T07:43:53ZRE: Delft3D FLOW Tracer Negative ConcentrationNill Nghttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=8229932016-01-26T01:46:58Z2016-01-26T01:46:58ZAdri, Thanks for your answer.<br /><br />The model was run on Delft3D FLOW only with a single domain.<br />You are right that the negative values are small (initial tracer concentration = 1, negative concentration ~= >0.01).<br />And the results seem reasonable except for the fact that the curve sometimes goes slightly below zero.<br />Only Salinity (constant stratified boundary), Temperature (Excess Temperature mode, constant stratified boundary), Pollutants and tracer (3 types of tracers) and Wind (uniform constant wind field) were activated for the runs.<br /><br />By "negligible small negative values may appear in complex situations or when you are <u>running in parallel</u>, running online with Delft3D-WAVE or using DomainDecomposition", do you mean running multiple standalone models at the same time or other sort of coupling between other models?<br />Indeed I had 14 separate Delft3D FLOW models running on the same machine.<br />Did you mean that would slightly affect the model performance?<br /><br />I will follow your suggestion and try to debug it on my own first.<br />Will update the status later this week.Nill Ng2016-01-26T01:46:58ZRE: Delft3D FLOW Tracer Negative ConcentrationAdri Mouritshttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=8224062016-01-25T10:55:27Z2016-01-25T10:55:27ZHi Nill Ng,<br /><br />In principle, negative concentrations should not appear. I can imagine that negligible small negative values may appear in complex situations or when you are running in parallel, running online with Delft3D-WAVE or using DomainDecomposition.<br /><br />Can you describe in more detail what processes/tools are switched on and what the typical relative error is? If you think that something is going wrong, please zip your model input files and attach it to a post on this forum. Ideally, you start by isolating the problem in an as simple as possible testcase that shows the problem.<br /><br />Thanks.<br /><br />AdriAdri Mourits2016-01-25T10:55:27ZDelft3D FLOW Tracer Negative ConcentrationNill Nghttps://oss.deltares.nl/c/message_boards/find_message?p_l_id=1806765&messageId=8220232016-01-25T03:28:00Z2016-01-25T03:26:18ZHi all,<br /><br />I am running project that involves setting initial concentration of an inert tracer and let it disperse through tidal flushing in FLOW.<br />No discharge of tracer was involved and the boundary conditions were set to constant zero.<br />A couple of observation points were set in area where a unit concentration of the inert tracer was set in the initial condition (using QUICKIN).<br />For short period of time, time series at these observation points drop below zero well after the model is stabilized (i.e. no more warning signal about "Velocity change too high" after 30 timesteps ).<br />The model was built using 1 min timestep but the problem still persist even if I reduce the timestep to 0.02 min (1.2 s) so I expect that is not a problem with courant number.<br />Did anyone encounter something like this previously? Any advice?<br /><br />Thanks.Nill Ng2016-01-25T03:26:18Z