This file can then be imported in the usual way. So we suggest that you read the file into Excel (or similar), transpose each of the RAO tables and add the required mark-up text, and save the file as text. OrcaFlex is not able to import any WADAM RAO data directly: WADAM displacement and load RAO tables have the 6 degrees of freedom arranged as rows rather than columns, and it is not possible to mark up this format in a way which is consistent with the required OrcaFlex headers. If this is not possible then you should refer to the remainder of this topic, which describes the ways in which you need to manipulate native WADAM files in order to import their data into OrcaFlex. If the WAMIT format option is not available to you, the data can be imported from WADAM but will need some manipulation and some mark-up text to get them into the format required by OrcaFlex: if at all possible, we recommend that you follow the WAMIT-format route as this should be less error-prone. out files, with no need for any markup or other editing of the results file. Once you have a WAMIT-format output file, OrcaFlex will recognise it as such and import it as it does native WAMIT.
out file from WADAM is described in the WADAM manual for versions which allow this option (v9.2 onwards). The procedure for creating a complete WAMIT. You should be aware that complete WAMIT-format files are not saved by default in WADAM, and you must follow a specific procedure to obtain such a file. cwd() / filename # anim.The easiest way to import from WADAM into OrcaFlex is to save the results in WAMIT format, an option available in more recent versions of WADAM. Wave_direction = - 0.5 * pi omega = 2 * pi / 9 anim = setup_animation( body, fs, omega = omega, wave_amplitude = 2, wave_direction = wave_direction)Īnim. Return animation if _name_ = '_main_':įs = cpt. add_free_surface( fs, wave_amplitude * ( incoming_waves_elevation)) full_body, faces_motion = wave_amplitude * rao_faces_motion)Īnimation. # SET UP ANIMATION animation = Animation( loop_duration = 2 * pi / omega)Īnimation.
# COMPUTE FREE SURFACE ELEVATION # Compute the diffracted wave pattern incoming_waves_elevation = fs. sel( omega = omega, radiating_dof = dof). # Compute the motion of each face of the mesh for the animation rao_faces_motion = sum( dataset. rao( dataset, wave_direction = wave_direction) * radiation_results, diffraction_result = results dataset = cpt. Return boat def setup_animation( body, fs, omega, wave_amplitude, wave_direction) -> Animation: add_dofs_labels_to_matrix( 1000 * I)īoat. # They need to be computed independently. # The computation of the RAO requires the values of the inertia matrix and the hydrostatic stiffness matrix. , array(, RectangularParallelepiped( size =( length, width, 2 * draft), resolution =( 20, 6, 5)) # boat = _file("boat_200.mar", file_format="mar", name="pirate ship") # boat.rotate_z(pi) length = 100 width = 30 draft = 4 boat = cpt.
INFO, format = '%(levelname)-8s: %(message)s')ĭef generate_barge() -> cpt. Import logging from pathlib import Path import numpy as np from numpy import pi import capytaine as cpt from capytaine.