Mid mission weight change

44 views
Skip to first unread message

Daniel E.

unread,
May 2, 2022, 2:39:45 PM5/2/22
to SUAVE FORUM
How would I go about changing the weight of my vehicle mid-mission? For example a store separation problem. I attempted changing the analysis.extend line in the mission_setup but that didn't seem to propagate the weight change I wanted.

Thanks
- Daniel 

Daniel E.

unread,
May 2, 2022, 3:19:19 PM5/2/22
to SUAVE FORUM
Just to add to this, I have already setup 2 vehicle configurations. And I can run the base_mission with each configuration independently. But now I would like to change the vehicle configuration (weight and OML)  mid-mission as I am dropping a store. 

Daniel E.

unread,
May 3, 2022, 3:32:21 PM5/3/22
to SUAVE FORUM
Ive traced the issue to the way sequential_segments handles data. The way I see it, I have two options to change configuration mid-mission. I can do it mid-segment or between segments. 
Changing mid-segment involves creating a new mission type where store separation happens mid-segment. I'd have to figure out how to propogate the change to all the subdiscplines. 
If I change in-between segments, then I have to change how sequential_segments initializes. 

Does the SUAVE team have any thoughts on how to best handle this?

Emilio

unread,
May 3, 2022, 4:42:32 PM5/3/22
to SUAVE FORUM
Hi Daniel,
Your vehicle is definitely atypical. This isn't a bug. However, it's pretty easy to get around. You can hack SUAVE to do this without changing the source.

You can add a function to your script and have the mission call that function instead. Here's the function:

def initialize_weights(segment):

    m_initial = segment.analyses.weights.vehicle.mass_properties.takeoff

    segment.state.conditions.weights.total_mass[:,:] = m_initial


When you setup your mission just add this line to the segment you want the weight to change at:

segment.process.iterate.initials.weight = initialize_weights

-Emilio

Daniel E.

unread,
May 3, 2022, 6:12:19 PM5/3/22
to SUAVE FORUM
Thanks for the response. 
What about to propagate the OML change? Id like to take into account the difference in drag. 

Emilio

unread,
May 3, 2022, 6:13:48 PM5/3/22
to SUAVE FORUM
Even easier. When you setup the mission select the set of analyses that corresponds to the config.

-Emilio

Daniel E.

unread,
May 3, 2022, 6:15:37 PM5/3/22
to SUAVE FORUM
Via this line, correct?

segment.analyses.extend(analyses[tag])

Emilio

unread,
May 3, 2022, 6:16:52 PM5/3/22
to SUAVE FORUM
Yes

Daniel E.

unread,
May 3, 2022, 6:26:07 PM5/3/22
to SUAVE FORUM
Worked like a charm! Thanks
Reply all
Reply to author
Forward
0 new messages