Jump to content
TUFLOW FV

Toby Devlin

Administrators
  • Content Count

    25
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Toby Devlin

  1. Toby Devlin

    Version

    Hi Xixi, We have not compatibility tested the full toolbox on Matlab 2013b in quite some time. I can confirm that it works on 2017b - onward at this stage with certainty. However, that error makes it appear as though it is to do with the input datatype. It appears that one of the inputs is a cell array which is not expected. Its possible that whatever script is calling this function is treating variables in a different way in 2013b compared to 2019b. Do you require 2013b for a particular reason? or are you able to proceed using 2019b (or later)?
  2. Hi Keith, The atmospheric calculations for albedo (used in the incident radiation calculations) require a day of the year and a time of day at this stage. There is an item on the development list to calculate an average for users simulating in hours, or to specify a 'start date'. In the mean time unfortunately you will have to convert your model over to isodate to use the atmospheric calculations. I will update the documentation to reflect this limitation. -Toby
  3. Hi Keith, You can specify either 'surface sigma layers', or 'sigma layers' as both are accepted. Toby
  4. Hi Keith, You can specify either 'surface sigma layers', or 'sigma layers' as both are accepted. Toby
  5. Hi Ale, The bc default will be set to NaN. You can specify bc default == 20, etc. If you wish to apply a constant value. However, builds from 2014.01.024 onward will take the surface water temperature when the model finds NaN for precipitation temperature. Toby
  6. Hi Rohan, Most likely the output path name either has a typo in it, or not all of the folders have been created yet. Double check that the path exists exactly as specified in the error log.
  7. Hi Rohan, The error is most likely to you having two (or more) BCs specified on grids, but the grids have been given the same name. Double check the names of the grids you have specified and make sure they are all unique.
  8. Hi Keith, There are also alternative update options for cell-centered bathymetry such as polylines and polygons. These are all specified in the TUFLOWFV manual section 4.2.2 Toby
  9. Hi Keith, You are correct that the elevations of the model may need to be changed. The extreme case is when the cells adjacent to the culvert are so high as to not get wet at all, then there can be no flow through the structure. Even if they are wet however, the flow will be limited as the culvert appears cut off by the bathymetry. Have you specified the mesh elevations within the .2dm file or through a separate cell-centered csv? If you have specified through the .2dm, keep in mind that as TUFLOWFV is cell-centered, the true elevation internal to the model will be interpolated from the mesh vertices to the centroid of each cell. This can make things difficult in situations such as yours when attempting to control that cell without changing others. If not, then it should be a simple method to adjust the elevation of the relevant cells to be equal to or less than the culvert invert, and not affect any other cells.
  10. Hi PHA, It seems what you are most likely looking for is an 'initial condition 2D' specification. Initial condition 2D == my_initial_2d_file.csv Where the csv has a header line that is ID, TRACE_1, and corresponding values below. The first column is the cell ids, you don't need all of them, just the ones that you wish to change, though you can specify all if you wish, and the second column is the tracer concentration you want to initialise the model with, ie. 100. You can also use these files to set the water level (WL) current velocity (U, V), salinity (SAL), temperature (TEMP) and any other tracers you are modelling (TRACE_2, TRACE_3, etc) if you wish. We are also working on improving our BCs with FC_POLY boundaries, allowing users to have scalar inflows over all the cells within a user-specified polygon.
  11. Hi Lei, Thanks for posting. There are a few options to fixing your problem. The key is that the model by default will extrapolate internal water levels into the 'ghost cells' downstream of your weir. This means that the weir has the same water level either side causing complications. There are three options to force the model to do what you want. 1. You can add extra cells downstream of your weir and set a water level boundary around those cells to ensure they are always lower than your weir crest. 2. You can just add a water level boundary to the same nodestring as your weir is on. This is the same as solution 1 except the water level boundary will apply to the ghost cells so you cannot extract results from the ghost cells to confirm, though it doesn't require changing your mesh. 3. Instead of a weir structure you can specify an HQ bc boundary on your nodestring. HQ bcs require a comma delimited file of water levels and corresponding flow rates (make sure that you use negative flows for outflows). You can specify a range of water levels H and then use flows specified by Q = CBhd2/3 where hd is the height of water above your weir crest, not necessarily the same as the H column. The model will then interpolate the flows linearly between the water levels that you choose. ie. for a 100m wide channel with a weir crest at -2m and a weir coefficient of 1. H,Q -2,0 -1.98,-7.368062997 -1.96,-11.69607095 -1.94,-15.32618865 -1.92,-18.56635533 -1.9,-21.5443469 -1.88,-24.32880798 -1.86,-26.961995 -1.84,-29.47225199 -1.82,-31.87975708
  12. Hi Lei, without seeing your control file i would assume that the directory ../output/ may not exist? TuflowFV assumes that to be the default output directory, if you wish to have the output written to a different location then please use the command output dir == /my/output/directory/ If this isnt your problem, then I will need to see your control file.
  13. Hi Welcome to the forum, There is an existing post for installation of TuflowFv on a linux system: If you are referring to the process of actually running the software, you can call the command with the control file as the argument, ie. user@linuxmachine: ~> /home/software/tuflowfv/trunk/platform/linux_ifort/tuflowfv my_control_file.fvc or if you have used a link to shortcut the command user@linuxmachine: ~> tuflowfv my_control_file.fvc
  14. This problem can often be caused by the IDs column in you cell-centres file being inconsistent with the actual IDs of the elements in the 2dm. The upcoming release of TUFLOWFV will have a bathymetry from TIN option. This allows users to save their bathymetry set as an SMS .TIN file, and TUFLOWFV will do the interpolation and bathymetry inspection internally
  15. Hi Hamid, I have not come across this issue that I can recall, and I am using version 11.2.8 currently. Can you please post a screen grab of what this looks like before and after the change? Toby
  16. Sometimes in the initialisation of a model you may come across this error: ERROR:fvdomain_construct:fvinitout:fvout_construct:process_nodestring:Nodestring 1, segment 1 does not correspond to any model face. This is caused when TUFLOWFV has found a nodestring between two nodes that do not also have a face between them. If you have created the nodestring within SMS then you may find that you have not held down the shift key while creating your nodestring (will automatically include all the nodes between the two that you click), if you dont do this then sms only includes the first node you clicked, and the second node you clicked in the nodestring. If you created an external nodestring through TUFLOWFV and you have had this error returned check whether or not you need to have the boundary flag then try adding more waypoints as a first start, if this fails to work please post here or contact TUFLOWFV support.
  17. Toby Devlin

    Version

    Please Note that users of MATLAB 2014b may experience issues due to changes to MATLAB's graphics setup. Please post any issues here.
  18. The expression tool can be taken even further. If you want to input some function that requires input from two separate model runs, this can be achieved with a simple specifier. First you need to input a cell array of model files in the modfil input, the order of this is important. Then, (for example if we were comparing water level between two runs with different bathymetery), we specify our variables with M1. or M2. beforehand. eg. 'M1.H - M2.H' will subtract the water level of the second model in the model cell array from the water level of the first model. This has the same limitations of normal expressions, therefore at this stage it is not possible to do these comparisons on models with different numbers of cells.
  19. FVG objects construct a matlab patch object for the actual image that is presented on screen. Each face of the patch object represents the cells of the model, and the corners of these faces represent the vertices. The handle to this patch object is stored as a property of the fvg objects, which allow us to customize various aspects of the visualisation. Just a few of the options for this: If you want to apply a slight transparency to the entire mesh equally, you can edit the patch object's facealpha property. sheet1 = fvgsheet(fobj, modfil) patchhandle = sheet1.PatchObj; set( patchhandle , 'FaceAlpha', 0.5) This sets all the faces of the patch to be 50% transparent. Be careful when setting these patch properties as some of them will be updated by moving the slider bar, and all your hard work will be erased. for more info on patches and their properties, see MathWorks documentation on patches. http://www.mathworks.com.au/help/matlab/ref/patch.html http://www.mathworks.com.au/help/matlab/ref/patch_props.html
  20. Toby Devlin

    Version

    The basic functionality has been successfully tested on MATLAB 2012a. There may be minor performance issues related to matlab's overhauling of several simple functions for efficiency though. MATLAB 2011 may cause problems with some of the netcdf functions, which can be made backwards compatible if it is absolutely required. MATLAB version 2010b was the first matlab with netcdf-4 compatibility, so prior to that many functions will fail. Some of the extra add-on functions, for example creating video files, may have comptaibility issues, and limitations in file types, data format types and the input specifications required. Everything has been confirmed on MATLAB 2013a and above. If anyone has specific compatibility issues please post them here.
  21. You can set the axis properties 'xlimmode' and 'ylimmode' to 'manual'. matlab will otherwise try to change scale to accommodate anything that is plotted. If you set the xlim, or ylim specifically, or if you zoom in, matlab automatically switches this manual feature on. set(gca, 'XLimMode','manual', 'YLimMode', 'manual')
  22. The 'expression' property of fvg objects has a few more advanced options for truly customized output. One of these is the ability to bring in a workspace variable as part of your expression. Just put a dollar sign ($) in front of the variable that you wish to include from your workspace, ie. if you have a variable a=2; and you want to offset your water levels by this then '$a+H' would be your expression string. For single scalars though it is probably better to specify it directly, ie. if you want to offset all the water levels by 2m then 'H+2' is easier than storing the 2m in a variable beforehand. The real strength of this is for vectors, keep in mind that as usual, these vector and matrix operations will have specific limitations on size, and there are no extra checks in place to account for this. A useful example of using this is to plot the difference in a variable since a particular timestep, for example the start. A quick example is plotting the total change in bed level since the beginning of the model run, it will require extracting a variable seperately first. tmp = netcdf_get_var(modfil,'names','ZB','timestep',1); %BMTWBM function that will extract ZB at the first timestep firstbedlevel = tmp.ZB; %get it out of a structure and save it to a useful variable fobj = fvgraphics; %usual, gca customsheet = fvg_sheet(fobj, modfil, 'expression', 'ZB - $firstbedlevel') There are a lot of possibilities with this, the only downside being that it does require a bit of setting up first to get the variable that you want. Keep in mind that this variable will be 'saved' into the function persistantly, so even if you clear the original 'firstbedlevel' from your workspace, or change it, only the original one will be used in the calculations. If you wish to update the variable, then you must call the 'set' method on the expression again. ie. firstbedlevel = firstbedlevel+1; %changed the variable set(customsheet,'expression','ZB - $firstbedlevel'); %now it will bring in the new version of 'firstbedlevel';
  23. fvg objects all have a great property call 'expression'. This allows the users to overload the variables with a custom combination of variables. The scope of uses for this ranges from changing current velocity units to km/h, up to computing total change in bed level over time. the expression needs to be a string. eg. fvg_sheet(fobj , modfil , 'expression' , 'V*3.6') This will read in the variable V, then multiply it by 3.6, then plot that. You do not specify the variables when doing this, it is all done on the expression. This doesnt affect any other properties. a few things to keep in mind: The expression will allow some matlab builtins, sum, hypot, min, max, etc. but the correct, and sensible usage of all the functions is up to the users discretion. The variables that you will be working with will typically have some dimension followed by a number of cells dimension. The first dimension can be depth levels, or it could be number of sediments. keep that in mind when executing expressions that might change depending on whether doing calculations 'element-wise', or on the whole array. The expression calculations occur before depth averaging, so operations that occur on 2D and 3D variables at the same time ie. H*SAL will not work. Derived variables that may be allowed in the 'variables' property (ie. Vmag) will not be available in the expression string, you will have to calculate these from scratch if you need them, ie. 'hypot(V_x,V_y)'.
  24. Toby Devlin

    Memory Limits

    Linux users running TUFLOW-FV will occasionally have crashes related to segmentation faults. Many of these can be due to mysterious processor specific errors, but are ultimately a memory related error. A key cause can be default memory limits imposed on the process. To stop this from occurring ensure that the bash script, or pbs input script with which you launch the job has the following line ulimit -s unlimited If not, then the model will often crash without warning during the initialization, and only a PBS error file might have any information about a segmentation fault. Windows users need not worry, as the memory limits are adjusted automatically in the software and should generally stop these errors from occurring.
×
×
  • Create New...