diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 814c66b7..7cecffa9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ DesignSPHysics is currently under development and not ready for consumer use. It This document was updated at 31 of July, 2018. It is probable that the project has been modified since then and this document does not contain correct information. # How to contribute -Theres 2 main ways to contribute: Opening issues and contributing to the code. Below you can find information about the 2. +There's 2 main ways to contribute: Opening issues and contributing to the code. Below you can find information about the 2. ## Opening issues You can open issues in [this github repository](https://github.com/DualSPHysics/DesignSPHysics) to report errors or suggest new features or how to improve them. Keep in mind that there are a lot of things left to do and probably most of the missing features are coming eventually. The most useful feedback right now is error reporting and fixing. @@ -12,7 +12,7 @@ You can open issues in [this github repository](https://github.com/DualSPHysics/ ## Contributing to the code To contribute to the project please check the following section (Project Structure) as it contains a brief description about how the project is structure and where to find the related code for each UI element. -To submit code please make your changes onto the `develop` branch and open a pull request. The current mantainer of the code will check it as soon as possible to merge the change onto the branch. +To submit code please make your changes onto the `develop` branch and open a pull request. The current maintainer of the code will check it as soon as possible to merge the change onto the branch. # Project structure ## Branches @@ -49,7 +49,7 @@ For example, when the "Load Case" button is pressed, the function binded to it g To implement a new UI component with a feature just create, for example, a button and a function to execute when pressed. -The main data structure is a Python Dictionary with different data attached to its keys. To see a reference to the strucutre, check the `get_default_data()` function in `mod.utils`. +The main data structure is a Python Dictionary with different data attached to its keys. To see a reference to the structure, check the `get_default_data()` function in `mod.utils`. # Need more help? If you need help on how to contribute please contact one of the following people diff --git a/DesignSPHysics.py b/DesignSPHysics.py index 006f6937..73b9fa7e 100644 --- a/DesignSPHysics.py +++ b/DesignSPHysics.py @@ -93,7 +93,7 @@ # Establishing references for the different elements that the script will use later. fc_main_window = FreeCADGui.getMainWindow() # FreeCAD main window -# TODO: Big Change: This should definetly be a custom class like DesignSPHysicsDock(QtGui.QDockWidget) +# TODO: Big Change: This should definitely be a custom class like DesignSPHysicsDock(QtGui.QDockWidget) dsph_main_dock = QtGui.QDockWidget() # DSPH main dock # Scaffolding widget, only useful to apply to the dsph_dock widget dsph_main_dock_scaff_widget = QtGui.QWidget() diff --git a/README.md b/README.md index fa4e037f..9ba2eabd 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Check the [Official Webpage](http://design.sphysics.org) for downloads and more ![Screenshot](http://design.sphysics.org/img/github-shot-31072018.png) ## Description -DesignSPHysics enables the user to create cases with solids and fluids and exports it to a DualSPHysics compatbile format. In addition, it does the hard work for the user, generating the case automatically, simulating, and post-processing, all inside FreeCAD. +DesignSPHysics enables the user to create cases with solids and fluids and exports it to a DualSPHysics compatible format. In addition, it does the hard work for the user, generating the case automatically, simulating, and post-processing, all inside FreeCAD. It includes support for pre-processing with GenCase, simulation with DualSPHysics and post-processign with several tools of the DualSPHysics package. @@ -31,7 +31,7 @@ By default, for example, in Windows, it is located in `%appdata%/FreeCAD/Mod` or Next open the folder and copy the file `DesignSPHysics.FCMacro` into the FreeCAD macro directory (`%appdata%/FreeCAD/Macro` on Windows; `~/.FreeCAD/Macro` on GNU/Linux). -### Installing a develompent build +### Installing a development build Clone this repository and rename the folder to 'DesignSPHysics'. Then copy the folder to the Mod folder of the FreeCAD installation directory. By default, for example, in Windows, it is located in `%appdata%/FreeCAD/Mod` or in Linux in `~/.FreeCAD/Mod` diff --git a/dualsphysics/bin/DsphConfig.xml b/dualsphysics/bin/DsphConfig.xml index d99d0f85..06c4a275 100644 --- a/dualsphysics/bin/DsphConfig.xml +++ b/dualsphysics/bin/DsphConfig.xml @@ -2,6 +2,6 @@ - + diff --git a/mod/dataobjects/acc_rect_motion.py b/mod/dataobjects/acc_rect_motion.py index 89a2d6d5..ac168e18 100644 --- a/mod/dataobjects/acc_rect_motion.py +++ b/mod/dataobjects/acc_rect_motion.py @@ -9,7 +9,7 @@ class AccRectMotion(BaseMotion): Attributes: velocity: Velocity vector that defines the movement - acceleration: Acceleration vector that defines the aceleration + acceleration: Acceleration vector that defines the acceleration ''' def __init__(self, duration=1, velocity=None, acceleration=None, parent_movement=None): diff --git a/mod/dataobjects/constants.py b/mod/dataobjects/constants.py index a1e0fa33..5493b31b 100644 --- a/mod/dataobjects/constants.py +++ b/mod/dataobjects/constants.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3.7 # -*- coding: utf-8 -*- -''' DesignSPHysics case constans dataobject ''' +''' DesignSPHysics case constants dataobject ''' class Constants(): ''' DualSPHysics case constants definition dataobject. ''' diff --git a/mod/dataobjects/domain_fixed_parameter.py b/mod/dataobjects/domain_fixed_parameter.py index 99c93c6a..fdc3cdb9 100644 --- a/mod/dataobjects/domain_fixed_parameter.py +++ b/mod/dataobjects/domain_fixed_parameter.py @@ -7,11 +7,11 @@ class DomainFixedParameter(): ''' Fixed Domain for a DSPH case. Attributes: - xmin = Minimun X coordinate for the fixed domain + xmin = Minimum X coordinate for the fixed domain xmax = Maximum X coordinate for the fixed domain - ymin = Minimun Y coordinate for the fixed domain + ymin = Minimum Y coordinate for the fixed domain ymax = Maximum Y coordinate for the fixed domain - zmin = Minimun Z coordinate for the fixed domain + zmin = Minimum Z coordinate for the fixed domain zmax = Maximum Z coordinate for the fixed domain ''' diff --git a/mod/dataobjects/ml_piston_2d_veldata.py b/mod/dataobjects/ml_piston_2d_veldata.py index 7477270d..87a38cba 100644 --- a/mod/dataobjects/ml_piston_2d_veldata.py +++ b/mod/dataobjects/ml_piston_2d_veldata.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3.7 # -*- coding: utf-8 -*- -''' DesignSPHysics VelData atribute data. ''' +''' DesignSPHysics VelData attribute data. ''' class MLPiston2DVeldata(): diff --git a/mod/freecad_tools.py b/mod/freecad_tools.py index 74680097..bd86941d 100644 --- a/mod/freecad_tools.py +++ b/mod/freecad_tools.py @@ -103,7 +103,7 @@ def document_count() -> int: def document_open(document_name: str) -> bool: - ''' Returns wether the specified document name is opened within freecad. ''' + ''' Returns whether the specified document name is opened within freecad. ''' return document_name.lower() in list(FreeCAD.listDocuments().keys())[0].lower() diff --git a/mod/lang/english.json b/mod/lang/english.json index 759783d7..dbb967c4 100644 --- a/mod/lang/english.json +++ b/mod/lang/english.json @@ -147,7 +147,7 @@ "Enables motion for the selected MKBound": "Enables motion for the selected MKBound", "File Name": "File Name", "Estimated time to complete simulation: ": "Estimated time to complete simulation: ", - "Press 'Move up' to move an object up in the hirearchy.\nPress 'Move down' to move an object down in the hirearchy.": "Press 'Move up' to move an object up in the hirearchy.\nPress 'Move down' to move an object down in the hirearchy.", + "Press 'Move up' to move an object up in the hierarchy.\nPress 'Move down' to move an object down in the hierarchy.": "Press 'Move up' to move an object up in the hierarchy.\nPress 'Move down' to move an object down in the hierarchy.", "There was an error on the post-processing.": "There was an error on the post-processing.", "Open {}_Fluid": "Open {}_Fluid", "Y positions (separated by commas):": "Y positions (separated by commas):", @@ -692,7 +692,7 @@ "Spring radius: ": "Spring radius: ", "Length for revolution: ": "Length for revolution: ", "Error!": "Error!", - "bodies are necesary!": "bodies are necesary!", + "bodies are necessary!": "bodies are necessary!", "Link pointline configuration": "Link pointline configuration", "Sliding Vector: ": "Sliding Vector: ", "Point for rotation: ": "Point for rotation: ", diff --git a/mod/lang/spanish.json b/mod/lang/spanish.json index 3745576c..943e17df 100644 --- a/mod/lang/spanish.json +++ b/mod/lang/spanish.json @@ -188,7 +188,7 @@ "Scaling factor: ": "Scaling factor: ", "Threshold to detect free surface. Typically 1.5 for 2D and 2.75 for 3D (default=0).": "Threshold to detect free surface. Typically 1.5 for 2D and 2.75 for 3D (default=0).", "Interaction kernel": "Interaction kernel", - "Minimium time step": "Minimium time step", + "Minimum time step": "Minimum time step", "DT Time (s): ": "DT Time (s): ", "Gencase exported {} particles.\nPress \"Details\" to check the output": "Gencase exported {} particles.\nPress \"Details\" to check the output", "Selects an mass/density calculation method and its value.": "Selects an mass/density calculation method and its value.", @@ -595,7 +595,7 @@ "Import GEO options": "Import GEO options", "GEO File: ": "GEO File: ", "Error!": "Error!", - "bodies are necesary!": "bodies are necesary!", + "bodies are necessary!": "bodies are necessary!", "This will apply the initials properties to all objects with mkfluid = ": "This will apply the initials properties to all objects with mkfluid = ", "Velocity (m/s): ": "Velocity (m/s): ", "2": "2", diff --git a/mod/templates/case_summary_template.html b/mod/templates/case_summary_template.html index a633eced..45829cb6 100644 --- a/mod/templates/case_summary_template.html +++ b/mod/templates/case_summary_template.html @@ -68,7 +68,7 @@

Execution parameters

Time out data: {timeout}
Increase of Z+: {incz} %
Fluid particles allowed to be excluded from domain: {partsoutmax} %
- Miniumum rhop valid: {rhopoutmin}
+ Minimum rhop valid: {rhopoutmin}
Maximum rhop valid: {rhopoutmax} diff --git a/mod/templates/gencase/simulationdomain.xml b/mod/templates/gencase/simulationdomain.xml index 0980fb16..03819ffb 100644 --- a/mod/templates/gencase/simulationdomain.xml +++ b/mod/templates/gencase/simulationdomain.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/mod/templates/template.bat b/mod/templates/template.bat index af485f7f..02ffed79 100644 --- a/mod/templates/template.bat +++ b/mod/templates/template.bat @@ -31,7 +31,7 @@ if not "%ERRORLEVEL%" == "0" goto fail if not "%ERRORLEVEL%" == "0" goto fail :success -echo "------- Execution complete. If results were not the exepected ones check for errors. Make sure your case has a correct DP specification. -------" +echo "------- Execution complete. If results were not the expected ones check for errors. Make sure your case has a correct DP specification. -------" goto end :fail diff --git a/mod/widgets/acc_circular_motion_timeline.py b/mod/widgets/acc_circular_motion_timeline.py index 8378b798..a54cf339 100644 --- a/mod/widgets/acc_circular_motion_timeline.py +++ b/mod/widgets/acc_circular_motion_timeline.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3.7 # -*- coding: utf-8 -*- -'''DesignSPHysics Acclerated Circular Motion Timeline widget''' +'''DesignSPHysics Accelerated Circular Motion Timeline widget''' from PySide import QtGui, QtCore diff --git a/mod/widgets/constants_dialog.py b/mod/widgets/constants_dialog.py index 141f3b66..a8a988f1 100644 --- a/mod/widgets/constants_dialog.py +++ b/mod/widgets/constants_dialog.py @@ -18,7 +18,7 @@ class ConstantsDialog(QtGui.QDialog): - ''' A window to define and configure the constans of the case for later execution + ''' A window to define and configure the constants of the case for later execution in the DualSPHysics simulator. ''' def __init__(self): super(ConstantsDialog, self).__init__() @@ -119,7 +119,7 @@ def __init__(self): self.rhop0_layout.addWidget(self.rhop0_input) self.rhop0_layout.addWidget(self.rhop0_label2) - # Maximum still water lavel to calc. spdofsound using coefsound: layout and + # Maximum still water level to calc. spdofsound using coefsound: layout and # components self.hswlauto_layout = QtGui.QHBoxLayout() self.hswlauto_chk = QtGui.QCheckBox("Auto HSWL ") diff --git a/mod/widgets/execution_parameters_dialog.py b/mod/widgets/execution_parameters_dialog.py index 1092bf30..ecda8bad 100644 --- a/mod/widgets/execution_parameters_dialog.py +++ b/mod/widgets/execution_parameters_dialog.py @@ -292,7 +292,7 @@ def __init__(self): self.dtini_layout.addWidget(self.dtini_label2) self.on_dtiniauto_check() - # Minimium time step + # Minimum time step self.dtminauto_layout = QtGui.QHBoxLayout() self.dtminauto_chk = QtGui.QCheckBox("Minimum time step: ") if Case.instance().execution_parameters.dtmin_auto: @@ -303,7 +303,7 @@ def __init__(self): self.dtminauto_chk.toggled.connect(self.on_dtminauto_check) self.dtminauto_layout.addWidget(self.dtminauto_chk) self.dtmin_layout = QtGui.QHBoxLayout() - self.dtmin_label = QtGui.QLabel("Minimium time step: ") + self.dtmin_label = QtGui.QLabel("Minimum time step: ") self.dtmin_input = FocusableLineEdit() self.dtmin_input.setHelpText(__(HELP_DTMIN)) self.dtmin_input.setMaxLength(10) diff --git a/mod/widgets/export_progress_dialog.py b/mod/widgets/export_progress_dialog.py index 8f91144c..5750c2b0 100644 --- a/mod/widgets/export_progress_dialog.py +++ b/mod/widgets/export_progress_dialog.py @@ -8,7 +8,7 @@ class ExportProgressDialog(QtGui.QDialog): - ''' Export Progres Dialog. ''' + ''' Export Progress Dialog. ''' on_cancel = QtCore.Signal() diff --git a/mod/widgets/float_state_dialog.py b/mod/widgets/float_state_dialog.py index a734e437..afba4dfc 100644 --- a/mod/widgets/float_state_dialog.py +++ b/mod/widgets/float_state_dialog.py @@ -132,7 +132,7 @@ def __init__(self): self.floating_omegaini_layout.addWidget(self.floating_omegaini_auto) self.floating_translation_layout = QtGui.QHBoxLayout() - self.floating_translation_label = QtGui.QLabel(__("Traslation restriction: ")) + self.floating_translation_label = QtGui.QLabel(__("Translation restriction: ")) self.floating_translation_label.setToolTip(__("Use 0 for translation restriction in the movement (default=(1,1,1))")) self.floating_translation_label_x = QtGui.QLabel("X") self.floating_translation_input_x = QtGui.QComboBox() diff --git a/mod/widgets/link_hinge_edit.py b/mod/widgets/link_hinge_edit.py index 0365724a..9d261e81 100644 --- a/mod/widgets/link_hinge_edit.py +++ b/mod/widgets/link_hinge_edit.py @@ -157,6 +157,6 @@ def on_save(self): else: link_hinge_error_dialog = QtGui.QMessageBox() link_hinge_error_dialog.setWindowTitle(__("Error!")) - link_hinge_error_dialog.setText(__("bodies are necesary!")) + link_hinge_error_dialog.setText(__("bodies are necessary!")) link_hinge_error_dialog.setIcon(QtGui.QMessageBox.Critical) link_hinge_error_dialog.exec_() diff --git a/mod/widgets/link_linear_spring_edit.py b/mod/widgets/link_linear_spring_edit.py index 537355fa..75c97757 100644 --- a/mod/widgets/link_linear_spring_edit.py +++ b/mod/widgets/link_linear_spring_edit.py @@ -188,6 +188,6 @@ def on_save(self): else: link_linearspring_error_dialog = QtGui.QMessageBox() link_linearspring_error_dialog.setWindowTitle(__("Error!")) - link_linearspring_error_dialog.setText(__("bodies are necesary!")) + link_linearspring_error_dialog.setText(__("bodies are necessary!")) link_linearspring_error_dialog.setIcon(QtGui.QMessageBox.Critical) link_linearspring_error_dialog.exec_() diff --git a/mod/widgets/link_point_line_edit.py b/mod/widgets/link_point_line_edit.py index 5f5c5063..5ae5a89a 100644 --- a/mod/widgets/link_point_line_edit.py +++ b/mod/widgets/link_point_line_edit.py @@ -193,6 +193,6 @@ def on_save(self): else: link_pointline_error_dialog = QtGui.QMessageBox() link_pointline_error_dialog.setWindowTitle(__("Error!")) - link_pointline_error_dialog.setText(__("body 1 is necesary!")) + link_pointline_error_dialog.setText(__("body 1 is necessary!")) link_pointline_error_dialog.setIcon(QtGui.QMessageBox.Critical) link_pointline_error_dialog.exec_() diff --git a/mod/widgets/link_spheric_edit.py b/mod/widgets/link_spheric_edit.py index db6bee70..9249e780 100644 --- a/mod/widgets/link_spheric_edit.py +++ b/mod/widgets/link_spheric_edit.py @@ -141,6 +141,6 @@ def on_save(self): else: link_spheric_error_dialog = QtGui.QMessageBox() link_spheric_error_dialog.setWindowTitle(__("Error!")) - link_spheric_error_dialog.setText(__("body 1 is necesary!")) + link_spheric_error_dialog.setText(__("body 1 is necessary!")) link_spheric_error_dialog.setIcon(QtGui.QMessageBox.Critical) link_spheric_error_dialog.exec_() diff --git a/mod/widgets/properties_dock_widget.py b/mod/widgets/properties_dock_widget.py index f1cb9b5b..a89b8c0d 100644 --- a/mod/widgets/properties_dock_widget.py +++ b/mod/widgets/properties_dock_widget.py @@ -192,7 +192,7 @@ def on_remove_object_from_sim(self): self.need_refresh.emit() def on_damping_config(self): - ''' Configures the damping configuration for the selected obejct ''' + ''' Configures the damping configuration for the selected object ''' DampingConfigDialog(FreeCADGui.Selection.getSelection()[0].Name) def on_mkgroup_change(self, value): @@ -341,7 +341,7 @@ def set_mkgroup_text(self, text: str) -> None: self.mkgroup_label.setText(text) def get_cell_widget(self, row: int, column: int) -> QtGui.QWidget: - ''' Retrieves the appropiate QWidget for the row and column specified from the table. ''' + ''' Retrieves the appropriate QWidget for the row and column specified from the table. ''' return self.object_property_table.cellWidget(row, column) def fit_size(self) -> None: diff --git a/mod/xmlimporter.py b/mod/xmlimporter.py index 49aa7cac..b8e80e6c 100644 --- a/mod/xmlimporter.py +++ b/mod/xmlimporter.py @@ -181,7 +181,7 @@ def create_fc_objects(f, path): FreeCAD.ActiveDocument.getObject("Box" + str(elementnum)).Length = str(size[0]) + ' m' FreeCAD.ActiveDocument.getObject("Box" + str(elementnum)).Width = str(size[1]) + ' m' FreeCAD.ActiveDocument.getObject("Box" + str(elementnum)).Height = str(size[2]) + ' m' - # Suscribe Box for creation in DSPH Objects + # Subscribe Box for creation in DSPH Objects # Structure: [name] = [mknumber, type, fill] to_add_dsph["Box" + str(elementnum)] = [int(mk[1]), mk[0], drawmode] elif command.tag == "drawcylinder": @@ -211,7 +211,7 @@ def create_fc_objects(f, path): FreeCAD.Rotation(FreeCAD.Vector(rotation[1], rotation[2], rotation[3]), rotation[0])) FreeCAD.ActiveDocument.getObject("Cylinder" + str(elementnum)).Radius = str(radius) + ' m' FreeCAD.ActiveDocument.getObject("Cylinder" + str(elementnum)).Height = (top_point[2] - point[2]) * 1000 - # Suscribe Cylinder for creation in DSPH Objects + # Subscribe Cylinder for creation in DSPH Objects # Structure: [name] = [mknumber, type, fill] to_add_dsph["Cylinder" + str(elementnum)] = [int(mk[1]), mk[0], drawmode] elif command.tag == "drawsphere": @@ -230,7 +230,7 @@ def create_fc_objects(f, path): (point[2] + movement[2]) * 1000), FreeCAD.Rotation(FreeCAD.Vector(rotation[1], rotation[2], rotation[3]), rotation[0])) FreeCAD.ActiveDocument.getObject("Sphere" + str(elementnum)).Radius = str(radius) + ' m' - # Suscribe Sphere for creation in DSPH Objects + # Subscribe Sphere for creation in DSPH Objects # Structure: [name] = [mknumber, type, fill] to_add_dsph["Sphere" + str(elementnum)] = [int(mk[1]), mk[0], drawmode] elif command.tag == "drawfilestl":