API Mass Properties Priority and Comp_ID Results

43 views
Skip to first unread message

timoth...@gmail.com

unread,
Oct 19, 2021, 4:05:59 PM10/19/21
to OpenVSP
Hi team, I was trying to do some CG analysis using the MassProp tool through the Python API.

What is the correct Parm for setting the priority? I tried variations on GetParmVal(wing_id, "Priority", "Mass_Props") but it couldn't find the right one. I also tried the clicking on the GUI button and trying the click-and-drag to a text file trick, but it came out as NOT_DEFINED.

Also, not sure if this is a small bug but I noticed that in the results using PrintResults, increasing integers  from zero seem to be appended onto the Comp_ID

e.g.:
[result_name]       [type] [#] [current values-->]
Analysis_Duration_Sec1 1 0.126681 
Comp_CG             3 1 26.321589,-0.000000,0.663325 47.152414,0.000000,2.661833 32.373976,-0.000000,-0.004803 8.937633,4.761905,0.000000 
Comp_ID             2 1 ODPUJVXHZO0 SLTCWYTBRP1 UAIBSIQEID2 LYYXKJJOOS3 
Comp_Ixx            1 1 124.047229 2.697616 621.470007 1.466804 


In case the formatting comes out garbled, ODPUJVXHZO, SLTCWYTBRP, UAIBSIQEID, LYYXKJJOOS becomes ODPUJVXHZO0, SLTCWYTBRP1,UAIBSIQEID2,LYYXKJJOOS3.

Thanks for your continued work on OpenVSP!

Rob McDonald

unread,
Oct 19, 2021, 4:31:24 PM10/19/21
to ope...@googlegroups.com
When you run into a Parm that you can't figure out its Name/Group easily, I usually find a 'nearby' Parm and drag-n-drop it to the Design Variables GUI.  Then, click on that Parm and it will populate the pull-downs at the top of the GUI.

You now have a good starting point to browse the Container, Group, and Names...  Doing this with a Pod and the Density gives this...
Screen Shot 2021-10-19 at 1.20.26 PM.png

Where we see that Parm you want is called 'Mass_Prior'.

The indexing integer at the end of the ID is there to force symmetric copies of a single Geom to have unique ID's when the TMesh (triangle mesh) is created.  MeshGeom.cpp:3090

This is probably not desirable for the final ID output, but it would take some study to figure out what all would break if we changed it...

Rob




--
You received this message because you are subscribed to the Google Groups "OpenVSP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openvsp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openvsp/f58fa3fa-3963-49f0-bf33-f19e88a8b0d5n%40googlegroups.com.

timoth...@gmail.com

unread,
Oct 20, 2021, 6:40:17 AM10/20/21
to OpenVSP
Hi Rob,

Thanks for the tip with the DV GUI - I'll definitely make more use of that. I was thinking, structurally, would it make more sense to give the wing a higher priority or the fuselage? In the case of the fuselage having higher priority, then essentially the volume where the two intersect, the embedding wing section (within the fuselage) would be ignored, is that correct? If the wing were to take higher priority, then it would have some representation of fuel and carry-through structure? I guess ultimately, it's a bit case-by-case depending on the fidelity of modelling etc?

The only reason I noticed the IDs had integers tacked on was because I was using the comp_IDs for IDing the results coming out of the table. But as the names are output as well in Comp_Name, I can use that instead and keep unique names. (In fact, I had tried to use Comp_IDs because I thought it might be safer than using names initially.)

Thanks again,
Tim

Rob McDonald

unread,
Oct 20, 2021, 11:34:52 AM10/20/21
to ope...@googlegroups.com
I think case-by-case is the truth.

It depends a lot on the method of construction -- I would use very different techniques for a composite covered foam core vs. a traditional aluminum airplane.  If you're getting super detailed, you could model the spar and give it high priority, etc.

The ID's are generally easier to use than names -- a user can name two components the same thing -- but the ID's are always unique.  Names can change, but ID's stay the same, etc.

It wouldn't be too difficult for you to strip the numbers off the end of the ID's.  A true ID is only letters -- so any numbers you find can be dropped.

Rob


timoth...@gmail.com

unread,
Oct 20, 2021, 12:15:41 PM10/20/21
to OpenVSP
I see! Thanks, that makes sense. I'm working at a conceptual level of just planforms so I was just looking for an approximate estimate anyhow,

Thanks for the information on IDs only being letters - I'll do as you suggested and just strip of the digits.

Thanks,
Tim
Reply all
Reply to author
Forward
0 new messages