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.

setExternalAction – Moments

Hi,

I am a PhD student working in Qblade python SIL interface. I’m new to the Qblade and using the OC4Deepcwind example file. I need two clarification with the commands and location notations.

  1. I’m trying to add external moments to the mase of the structure according to below command. My forces works perfectly however, the the moments I have given does not applied to the model. I have tried different values and could not get to rotate the structure at all.
  2. I need to add these forces to the center of transition piece as attached in the screenshot. I used “JNT_1” as location ID, assuming that as transitioning piece. Is there any guide for the location IDs with graphical representation which i can refer in the future.

Thank you,

Charuka

Code

Fx=-605000.0
Fy = -4500.0
Mz = 2411240.0
# Forces
QBLADE.setExternalAction(b”ADDFORCE”,b”JNT_1″,c_double(Fx),c_int(0),b”X”,c_bool(True),c_int(0))
QBLADE.setExternalAction(b”ADDFORCE”,b”JNT_1″,c_double(Fy),c_int(0),b”Y”,c_bool(True),c_int(0))
# Moments
QBLADE.setExternalAction(b”ADDMOMENT”,b”JNT_1″,c_double(Mz),c_int(0),b”Z”,c_bool(True),c_int(0))
Uploaded files:
  • You need to login to have access to uploads.

Hi Charuka,

the issue is that you are using the wrong keyword: ADDMOMENT doesnt exists, you have to use ADDTORQUE.

See the corrected code below (I also corrected it slightly to match the exact function signature). Please note, when you copy/paste from the forum straight quoates are sometimes automatically converted to curly quoates, make sure that you have straight quotes in your script!

Fx=-605000.0
Fy = -4500.0
Mz = 2411240.0

# Forces
QBLADE.setExternalAction(b”ADDFORCE”,b”JNT_1″,c_double(Fx),c_double(0),b”X”,c_bool(True),c_int(0))
QBLADE.setExternalAction(b”ADDFORCE”,b”JNT_1″,c_double(Fy),c_double(0),b”Y”,c_bool(True),c_int(0))
# Moments
QBLADE.setExternalAction(b”ADDTORQUE”,b”JNT_1″,c_double(Mz),c_double(0),b”Z”,c_bool(True),c_int(0))

Regarding the joints: The most direct way to find their location is to look into the SUBJOINTS table within the substructure files table. But its also possible to visualize the joint positions directly in the GUI, see the attached screenshot where I marked the relevant visualization options in red.

BR,

David

Uploaded files:
  • You need to login to have access to uploads.
Charuka has reacted to this post.
Charuka

Thank you very much David,

It started working afterwards. The joint visualization helps a lot. I will keep it in mind for the future.

Kind regards,

Charuka.

Scroll to Top