Imposed DIsplacement/Velocity confusion

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Shayor
Posts: 24
Joined: Tue Jan 05, 2021 3:40 pm

Imposed DIsplacement/Velocity confusion

Post by Shayor »

Hello,
I wanted to know that does imposed displacement/velocity on the mesh walls or structure on which fluid forces act when used and the following added(source FSI Tutorial from CS Version 2):

double precision xfor(3)
Then, in the body of the subroutine, add the following source code:
! set the force components to zero
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
! get the cells corresponding to the cylinder surface
call getfbr(’1’, nlelt, lstelt)
!==========
! loop over the cells to integrate the force
! over the structure surface
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
! update the force
do ii = 1, ndim
xfor(ii) = xfor(ii) + ra(iforbr + (ifac-1)*ndim + ii-1)
enddo
enddo
! if the calculation is parallel, add the data from the
! other processes
if (irangp.ge.0) then
call
parrsm(ndim,xfor)
endif

will this give me the forces acting on the structure wall due the fluid flow?Or will it give me the forces due to which it will deform as I defined(might be just external forces instead of the fluid and affect the fluid flow instead in which case it is the reverse scenario).Quite confused. :roll:
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Imposed DIsplacement/Velocity confusion

Post by Yvan Fournier »

Hello,

This tutorial does not match your application: it uses the simple mass-spring model (the same as can be used in the GUI) for simplified structure movement, not some more generic surface movement.

In any cases, "xfor" should give you the stresses applied on the surface, but the syntax in that tutorial does not exist anymore. You can get this force on boundary faces directly using the "boundary_forces" field. For example,

Code: Select all

 const cs_real_3_t *b_forces
    = (const cs_real_3_t *)cs_field_by_name("boundary_forces")->val;
Best regards,

Yvan
Shayor
Posts: 24
Joined: Tue Jan 05, 2021 3:40 pm

Re: Imposed DIsplacement/Velocity confusion

Post by Shayor »

Thanks again @Yvan Fournier.Truly grateful yet again for answering all my question as different topics.I would say this that I tried to find a solution by first searching them in the previous posts(which should be the norm) before giving you guys any pain.
Post Reply