Skip to content

[Core] Fill buffer in Assign-whatever family of processes #14084

@rubenzorrilla

Description

@rubenzorrilla

Description
Current implementation of the Assign-whatever family of processes (e.g., AssignScalarVariableProcess, AssignVectorVariableProcesses and so on) always sets the 0 position of the buffer. This might be a problem sometimes, for instance when applying initial conditions, as all the positions of the buffer are 0 by default, resulting in artificial inertial contributions that are likely problematic to make the initial steps converge.

As far as I see it shouldn't be difficult to enable setting the buffer as we leverage the VariableUtils inside the processes and these allow for so. Hence, what I'd like to discuss is the interface. Taking the scalar one as reference, my suggestion, to be extended to the other processes will be

            "help"             : "This process sets a given scalar value for a certain variable in all the nodes of a submodelpart",
            "model_part_name"  : "please_specify_model_part_name",
            "variable_name"    : "SPECIFY_VARIABLE_NAME",
            "interval"         : [0.0, 1e30],
            "constrained"      : true,
            "buffer_position"  : 0
            "value"            : {},
            "local_axes"       : {}

As you can see, "buffer_position" (I'm open to suggestions for the naming) is by default 0, so we keep current behavior. Of course it can be any scalar referring to any position in the buffer, but I'd also enable to be a string so we can set "All" to completely fill the buffer.

I'd like to hear your thoughts before proceeding with the corresponding PR.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions