viktor.external.dsettlement
DSettlementAnalysis
- class viktor.external.dsettlement.DSettlementAnalysis(input_file)¶
Bases:
ExternalProgram
DSettlementAnalysis can be used to perform an analysis using DSettlement on a third-party worker. To start an analysis call the method
execute()
, with an appropriate timeout (in seconds). To retrieve the results call the methodget_output_file()
, afterexecute()
.Usage:
input_file = File.from_data("dsettlement input file body") dsettlement_analysis = DSettlementAnalysis(input_file=input_file) dsettlement_analysis.execute(timeout=10) output_file = dsettlement_analysis.get_output_file() # obtain output file in BytesIO sld_file = dsettlement_analysis.get_sld_file() # obtain sld file in StringIO (to post-process)
Exceptions which can be raised during calculation: -
viktor.errors.ExecutionError
: generic error. Error message provides more information- Parameters
input_file (
Union
[BytesIO
,File
]) – .sli input file.
- get_output_file(extension='.sld', *, as_file=False)¶
Method can be used to retrieve the results generated by running an external analysis. Call method
execute()
first andget_output_file()
afterwards.- Parameters
extension (
str
) – extension of the file you want to return; one of: ‘.sld’, ‘.slo’, ‘.error.log’, ‘.err’as_file (
bool
) – return as BytesIO (default) or FileNew in v13.5.0
- Return type
Union
[BytesIO
,File
,None
]
CalculationModel
- class viktor.external.dsettlement.CalculationModel(value)¶
Bases:
Enum
An enumeration.
- NEN_KOPPEJAN: CalculationModel = 0¶
- NEN_BJERRUM: CalculationModel = 1¶
- ISOTACHE: CalculationModel = 2¶
ConsolidationModel
- class viktor.external.dsettlement.ConsolidationModel(value)¶
Bases:
Enum
An enumeration.
- DARCY: ConsolidationModel = 0¶
- TERZAGHI: ConsolidationModel = 1¶
DrainType
DrainGrid
DrainageSimpleMode
- class viktor.external.dsettlement.DrainageSimpleMode(begin_time, end_time, underpressure, dewatering_head_or_pressure)¶
-
Simple drainage schema; to be used in VerticalDrain.
- Parameters
begin_time (
float
) – [days]end_time (
float
) – [days]underpressure (
float
) – [kPa]dewatering_head_or_pressure (
float
) – water head [m] or tube pressure (if VerticalDrain.drain_type = SAND_WALL) [kPa]
Metadata
- class viktor.external.dsettlement.Metadata(file_name='-', company='-', created_by='-', title_1='-', title_2='-', title_3='-', write_date=False, write_time=False)¶
-
Data-class for defining metadata.
- Parameters
file_name (
str
) –company (
str
) –created_by (
str
) –title_1 (
str
) – max. 50 characterstitle_2 (
str
) – max. 50 characterstitle_3 (
str
) – max. 50 characterswrite_date (
bool
) – True to write the current date to the sli file; False for dummy (‘01/01/1900’)write_time (
bool
) – True to write the current date to the sli file; False for dummy (‘00:00:00’)
- Raises
ModelError – if title_1, title_2 or title_3 has more than 50 characters