// tslint:disable /** * 3Di API * 3Di simulation API (latest stable version: v3) Framework release: 3.0.1 3Di core release: 2.3.0.dev0 deployed on: 10:42AM (UTC) on October 04, 2022 * * The version of the OpenAPI document: v3 * Contact: info@nelen-schuurmans.nl * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; /** * * @export * @interface NumericalSettings */ export interface NumericalSettings { /** * * @type {number} * @memberof NumericalSettings */ readonly id?: number; /** * * @type {number} * @memberof NumericalSettings */ readonly simulationId?: number; /** * * @type {number} * @memberof NumericalSettings */ pumpImplicitRatio: number; /** * Strictness of CFL (Courant–Friedrichs–Lewy) condition for 1D. * @type {number} * @memberof NumericalSettings */ cflStrictnessFactor1d: number; /** * Strictness of CFL (Courant–Friedrichs–Lewy) condition for 2D. * @type {number} * @memberof NumericalSettings */ cflStrictnessFactor2d: number; /** * Minimal convergence criterion for Newton\'s method, suitable default is 1.0e-5, due to numerical precision. * @type {number} * @memberof NumericalSettings */ convergenceEps: number; /** * Convergence criterion of cg-method, suitable default is 1.0e-9, due to numerical precision. * @type {number} * @memberof NumericalSettings */ convergenceCg: number; /** * Threshold value for upwind scheme based on flow velocity, suitable default is 1e-06. * @type {number} * @memberof NumericalSettings */ flowDirectionThreshold: number; /** * In case the friction assumptions based on the dominant friction balance gives a structurally underestimation of the friction, you can switch this setting on. Options: 0 = off 1 = max between avg and divided channel based friction 2 = always linearized 3 = linearizes the depth based on a weighed averaged If options 3 is used the maximum depth of a thin layer needs to be defined. Do not use in combination with interflow. Suitable default is 0 (OFF). * @type {number} * @memberof NumericalSettings */ frictionShallowWaterDepthCorrection: number; /** * Suitable default is 1.0e-8 * @type {number} * @memberof NumericalSettings */ generalNumericalThreshold: number; /** * There are various methods to discretize the equations. At the moment only the first-order, semi-implicit method is supported and tested. Options: 0 = euler implicit * @type {number} * @memberof NumericalSettings */ timeIntegrationMethod?: number; /** * The limiter on the water level gradient allows the model to deal with unrealistically steep gradients. Suitable default is 1. * @type {number} * @memberof NumericalSettings */ limiterWaterlevelGradient1d: number; /** * The limiter on the water level gradient allows the model to deal with unrealistically steep gradients. Suitable default is 1. * @type {number} * @memberof NumericalSettings */ limiterWaterlevelGradient2d: number; /** * This limiter starts working in case the depth based on the downstream water level is zero and may be useful in sloping areas. Options: 0 = off 1 = higher order scheme (might be sensitive to instabilities) 2 = cross-sections treated as upwind method volume/surface area 3 = combination traditional method thin layer approach If option 3 is used the maximum depth of a thin layer needs to be defined. Do not use in combination with interflow. * @type {number} * @memberof NumericalSettings */ limiterSlopeCrossectionalArea2d: number; /** * This limiter starts working in case the depth based on the downstream water level is zero and may be useful in sloping areas. This limiter is mandatory if the limiter_slope_crossectional_area_2d setting is greater than 0. Do not use in combination with interflow. Suitable default is 0 (OFF) Options: 0 = off 1 = standard * @type {number} * @memberof NumericalSettings */ limiterSlopeFriction2d: number; /** * Maximum number of non-linear newton iterations in single time step. Suitable default is 20. * @type {number} * @memberof NumericalSettings */ maxNonLinearNewtonIterations: number; /** * Values below are advised for different model types: 700 for 1D flow 7 for 1D and 2D flow 5 for surface 2D flow only 7 for surface and groundwater flow 70 for 1D, 2D surface and groundwater flow or higher. Play around with this value, can speed up your model significantly, especially in case of ground water flow. Suitable default is 0. * @type {number} * @memberof NumericalSettings */ maxDegreeGaussSeidel: number; /** * To guarantee some initial friction only in flooded areas and for large time steps, it is wise to assume a minimum velocity for computing the friction. Suitable default is 0.01. * @type {number} * @memberof NumericalSettings */ minFrictionVelocity: number; /** * Suitable default is 1.0e-8. * @type {number} * @memberof NumericalSettings */ minSurfaceArea: number; /** * Use pre-conditioner for matrix solver. Increases simulation speed in most cases. Options: 0 = off 1 = standard . Suitable default is 1 (STANDARD). * @type {number} * @memberof NumericalSettings */ usePreconditionerCg: number; /** * A conceptual vertical narrow slot providing a conceptual free surface condition for the flow when the water level is above the top of a closed conduit. Often used to guarantee stability. Not necessary in 3Di even for pressurized pipe flow. Note: Works only for circular profiles. Suitable default is 0.0. Unit: m2. * @type {number} * @memberof NumericalSettings */ preissmannSlot: number; /** * Mandatory when using friction_shallow_water_depth_correction option 3 or limiter_slope_crossectional_area_2d option 3. Unit: m * @type {number} * @memberof NumericalSettings */ limiterSlopeThinWaterLayer: number; /** * Number of conjugate gradient method iterations, before switching to another method. Suitable default is 20. * @type {number} * @memberof NumericalSettings */ useOfCg: number; /** * Set to \'True\' for 1D calculations with closed profiles to handle non-linearity in volume-water level relation. When set to \'False\' it will be used if calculations become non-linear. For sewerage systems it is advised to set this setting to \'True\'. Otherwise a suitable default is \'False\' * @type {boolean} * @memberof NumericalSettings */ useNestedNewton: boolean; /** * Water depth threshold for flow between 2D cells. Depth relative to lowest bathymetry pixel at the edge between two 2D cells. Suitable default is 0.000001. * @type {number} * @memberof NumericalSettings */ floodingThreshold: number; } export function NumericalSettingsFromJSON(json: any): NumericalSettings { return { 'id': !exists(json, 'id') ? undefined : json['id'], 'simulationId': !exists(json, 'simulation_id') ? undefined : json['simulation_id'], 'pumpImplicitRatio': json['pump_implicit_ratio'], 'cflStrictnessFactor1d': json['cfl_strictness_factor_1d'], 'cflStrictnessFactor2d': json['cfl_strictness_factor_2d'], 'convergenceEps': json['convergence_eps'], 'convergenceCg': json['convergence_cg'], 'flowDirectionThreshold': json['flow_direction_threshold'], 'frictionShallowWaterDepthCorrection': json['friction_shallow_water_depth_correction'], 'generalNumericalThreshold': json['general_numerical_threshold'], 'timeIntegrationMethod': !exists(json, 'time_integration_method') ? undefined : json['time_integration_method'], 'limiterWaterlevelGradient1d': json['limiter_waterlevel_gradient_1d'], 'limiterWaterlevelGradient2d': json['limiter_waterlevel_gradient_2d'], 'limiterSlopeCrossectionalArea2d': json['limiter_slope_crossectional_area_2d'], 'limiterSlopeFriction2d': json['limiter_slope_friction_2d'], 'maxNonLinearNewtonIterations': json['max_non_linear_newton_iterations'], 'maxDegreeGaussSeidel': json['max_degree_gauss_seidel'], 'minFrictionVelocity': json['min_friction_velocity'], 'minSurfaceArea': json['min_surface_area'], 'usePreconditionerCg': json['use_preconditioner_cg'], 'preissmannSlot': json['preissmann_slot'], 'limiterSlopeThinWaterLayer': json['limiter_slope_thin_water_layer'], 'useOfCg': json['use_of_cg'], 'useNestedNewton': json['use_nested_newton'], 'floodingThreshold': json['flooding_threshold'], }; } export function NumericalSettingsToJSON(value?: NumericalSettings): any { if (value === undefined) { return undefined; } return { 'pump_implicit_ratio': value.pumpImplicitRatio, 'cfl_strictness_factor_1d': value.cflStrictnessFactor1d, 'cfl_strictness_factor_2d': value.cflStrictnessFactor2d, 'convergence_eps': value.convergenceEps, 'convergence_cg': value.convergenceCg, 'flow_direction_threshold': value.flowDirectionThreshold, 'friction_shallow_water_depth_correction': value.frictionShallowWaterDepthCorrection, 'general_numerical_threshold': value.generalNumericalThreshold, 'time_integration_method': value.timeIntegrationMethod, 'limiter_waterlevel_gradient_1d': value.limiterWaterlevelGradient1d, 'limiter_waterlevel_gradient_2d': value.limiterWaterlevelGradient2d, 'limiter_slope_crossectional_area_2d': value.limiterSlopeCrossectionalArea2d, 'limiter_slope_friction_2d': value.limiterSlopeFriction2d, 'max_non_linear_newton_iterations': value.maxNonLinearNewtonIterations, 'max_degree_gauss_seidel': value.maxDegreeGaussSeidel, 'min_friction_velocity': value.minFrictionVelocity, 'min_surface_area': value.minSurfaceArea, 'use_preconditioner_cg': value.usePreconditionerCg, 'preissmann_slot': value.preissmannSlot, 'limiter_slope_thin_water_layer': value.limiterSlopeThinWaterLayer, 'use_of_cg': value.useOfCg, 'use_nested_newton': value.useNestedNewton, 'flooding_threshold': value.floodingThreshold, }; }