hexagon logo

How can I obtain aggregate mass properties relative to a particular marker in batch mode with only Requests as outputs?

I have been trying to use the aggregate_mass function through the expression builder to get what I need, but aggregate_mass return values do not change when the mass properties are changed through design variables (with arrays and DVs).
  • I have tried parameterizing in Arrays as well as in Design Variables and both do not update when design variables alter mass properties.
  • I have tried making computed measures as well, and those do update when design variables alter mass properties, but upon loading an exported .cmd file, it gives the error that the component of mass properties necessary in the aggregate_mass function "is not a valid parameter". Screenshot attached. So that's also not an option for batch mode unless I can get it to work somehow. These measures work well within a single session of ADAMS View, but when loaded give an error and zero out the measure.
 
Is there a way to update these values when I run in batch mode? Currently the only way to update the values that I've seen is to go back into the parameterized expression, hit "Evaluate", and click "ok" back down out of the tree. Available resources also constrain me to using Requests (.res files) as the sole output from my batches.
 
Thank you for any help.

Attached Files (1)
  • The aggregate_mass() function is a design time function. That will not work during an analysis.
    Measures are used during analysis, and res-files are output from an analysis.
     
    When you create the compute measure in the interface, it shows you 6 values, right?
    These are the design time values of aggregate_mass({...}, ref, "inertias").
  • Thanks for your response, Henrik. Are design time functions not meant to work or recalculate when there are design variable changes either?​
     
    Is there any method to calculate the aggregate mass properties of a set of parts that I can do in ADAMS View if the aggregate_mass command won't work?
  • Hi Mark,
     
    If I am understanding correctly, you are using the aggregate_mass() design-time function to compute the aggregate mass and perhaps inertia properties of a set of parts in your system. Then using another set of design variables you change the model configuration. But after every change in the model configuration, you see that the reported aggregate, for instance, does not change.
     
    I just tested this in Adams 2021.0.1, whereby I use two design variable named left_end_x and right_end_x to change the model configuration to directly affect the aggregate mass. Then when I check my aggMass design variable, I see that the design variable's value has been updated. I also use the value of this design variable in a sample measure (mass_times_g) and see that the measure reported value changes as a result.
     
    The model is attached for your review. I have also created a case for your in our system through which I will send you an email. If you have further detailed questions, you could respond to that email directly.
     
    Thank you,
    Maziar Rostamian,
    MSC Software

    Attached Files (1)
  • If you need something that works during an analysis:
    Check out the utility BODY_MASS_PROPERTY that can be used from a user written REQSUB.
     
    The other possibility is an analytical formula using the sum of masses and their locations to determine the total COG.
    This involves a tricky macro to loop over all parts above a significant mass and stitch together the expressions as strings.
     
    I'm using both methods as a kind of runtime AGGREGATE_MASS and both show equal results.
     
    But your initial intention rings a bell for a possible bug in the AGGREGATE_MASS() design time function.
    Currently I have a user who insists having a model that doesn't react to switching load variants (i.e. switching should create a new full vehicle weight, but dependent parameter stays at the same value) .
    In our case there was a real variable created with real_value = (AGGREGATE_MASS(model,model.ground.origo,"mass"))
     
    The method you are using should have perfectly worked, i.e. parametrize a part mass to a design variable should have changed the AGGREGATE_MASS output.
    In our case writing out an adm from the changed state, truggered an update, i.e. the adm contained the right mass values. You may check that for your case, too.
     
    If it is the same "update" problem, I'd strongly vote for MSC opening a case on this issue and fixing it !