Forum

Important Notice for New User Registrations

To combat an increasing number of spam and bot registrations, we now manually approve all new user registrations. While this may cause a delay until your account is approved, this step is essential to ensure the quality and security of this forum.

To help us verify your registration as legitimate, please use a clear name as user name or an official email address (such as a work, university, or similar address). If you’re concerned that we may not recognize your registration as non-spam, feel free to email us at with a request to approve your username.

Please or Register to create posts and topics.

Adding Forces to Nodes Dynamically in Python

Hi,

I am a mechanical engineering student on a research internship performing simulations of floating offshore wind turbines. I am new to QBlade, and I am attempting to set up dynamic forces on nodes of the substructure of the turbine, but I am not seeing any results in the movement of the floating wind turbine throughout the simulation. I have removed the moorings from the simulation to allow the turbine to free float which is functioning as expected otherwise, and I am using the OC4Deepcwind example file. Is there somewhere in the software to find a list of all the structural node/element names? The relevant code I am trying to run is pasted below.

Thanks,
Lucas

        if i in range(5,20):
                # Force addition testing
                QBLADE.setExternalAction(
                b”ADDFORCE”,
                b”SUB_5″,
                c_double(6e9),
                c_int(0),
                b”X”,
                c_bool(True),
                c_int(0)
                )

Hi Lucas,

for me the following command is working (in a python script):

QBLADE.setExternalAction(b”ADDFORCE”,b”SUB_5″,c_double(1e7),c_double(0.0),b”X”,c_bool(False),c_int(0))

I am applying this also to the OC4 Semisub example. In the command you shared you had some formatting issues, just compare with the one I posted above. The load you initially applied (6e9N) was so large that the simulation diverged, so I reduced it to 1e7N…

You can apply the load to any joint x (JNT_X) or substructure member x (SUB_X) from the SUBJOINTS or SUBMEMBERS table.

P.S. This forum editor converts “straight quoates” to “curly quotes” automatically, make sure to convert back to “straight quotes” when copying the command into you script…

BR,

David

laframpton has reacted to this post.
laframpton

Hi David, thanks for the help, it works.

Cheers,
Lucas

Scroll to Top