Skip to content

Setting force #3050

Answered by v-dobrev
Torubara-Oleg asked this question in Q&A
May 27, 2022 · 3 comments · 5 replies
Discussion options

You must be logged in to vote

Hi @Torubara-Oleg,

The vector coefficient f defines the force applied to all boundary elements. Using the VectorArrayCoefficient sub-class of VectorCoefficient allows us to define its components as separate scalar coefficients. The first loop sets the first dim-1 components to 0 (for all boundary attributes). The Vector pull_force defines the last component (y in 2D, z in 3D) for the different boundary attributes: the first step pull_force = 0.0 initializes all entries of the array with 0, and the line pull_force(1) = -1.0e-2 overwrites the value for boundary attribute 2 -- the convention used by PWConstCoefficient is that index k in the input Vector corresponds to boundary attribute k+1,…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@Torubara-Oleg
Comment options

Comment options

You must be logged in to vote
2 replies
@Torubara-Oleg
Comment options

@gokhalen
Comment options

Answer selected by Torubara-Oleg
Comment options

You must be logged in to vote
2 replies
@v-dobrev
Comment options

@gokhalen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants