Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organizing Equipment, Lines and Dynamical Matrices #100

Open
ferrari212 opened this issue Sep 25, 2019 · 2 comments
Open

Organizing Equipment, Lines and Dynamical Matrices #100

ferrari212 opened this issue Sep 25, 2019 · 2 comments
Assignees

Comments

@ferrari212
Copy link
Contributor

ferrari212 commented Sep 25, 2019

The lines (mooring and equipment lines), dynamical matrices (masses, damping and restoration), and the equipment I am inserting for epoch project are disconnected with any external JSON file, creating a lot of global variables like in the examples that succeeded my 6DOF calculation:
https://github.com/shiplab/vesseljs/blob/master/examples/Ship_in_Ocean_dynamical.html
https://github.com/shiplab/vesseljs/blob/master/examples/Ship_in_Ocean_dynamical_MooringWave.html
https://github.com/shiplab/vesseljs/blob/master/examples/Ship_in_Ocean_dynamical_MooringWave_Parametric.html

I have some solutions for how to organize better those information and I would like @hmgaspar , @EliasHasle , @icarofonseca , and all others in the project to identify the best solution based on the vesseljs main objective:

  1. Insert the elements variables in the JSON of the ship and change the function loadShip to read those information. This solution could be applied to mooring lines or dynamical matrices, once they can be interpreted as part of the ship system information.
  2. Create a function similar to loadShip to read the other elements. This solution could be applied if we interpreter the mooring as a different system from the ship and could prevent errors in loadShip.
  3. Let elements in the own code, just transforming the global variable into smaller object oriented variables.
@EliasHasle
Copy link
Collaborator

I would recommend starting with 3, first focusing on structuring the code into a nice, reusable module. Do 2 if needed in the process. Then one can decide later whether it belongs in the ship or elsewhere.

@hmgaspar
Copy link
Member

@ferrari212 Check if this is the answer, and later close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants