Page 1 of 2

ALE simulations: local fluid force on specific rigid body positions

Posted: Mon Oct 14, 2019 2:02 pm
by daniele
Hello,

When performing ALE simulations with the internal coupling for rigid body/mesh displacement computation, fluid forces are monitored during the simulation. I guess the default printed value represents the integral of the fluid forces along the i-direction on the rigid body.
Is there a way of monitoring the local fluid forces on specific user-defined points of the rigid body? For a tube moving in the Z and X directions, can I obtain N local forces values along the Y direction?

Thank you very much in advance.

Best regards,

Daniele

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Tue Oct 15, 2019 6:20 pm
by Luciano Garelli
Hello,

I really don't understand very well the question....but the forces computed are normal and tangencial to specific faces and also you can get the X,Y,Z with respect to the global reference.

If the object is moving in the Z and X direction I don't understand why do you get forces in the Y direction.

Regards,
Luciano

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Wed Oct 16, 2019 8:44 am
by daniele
Hello,

Thank you for your help. I don't want to get the force on the Y direction, but to create N points along Y (of the rigid body), where to monitor X and Z forces...

Hope my question is clearer now...

Thank you very much.
Regards,

Daniele

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Wed Oct 16, 2019 9:25 am
by Luciano Garelli
Hello,

But these "points" should be associated to some surface or area in order to compute forces, or chose the boundary face in the rigid body which contain or is placed the point.

After you have selected the face or surface(faces) you can computed the forces using the cs_user_extra_operations, which is call every time step.

Regards,
Luciano.

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Mon Nov 18, 2019 2:34 pm
by daniele
Hello,

I am still trying to get the forces on selected faces, but I have some issues.
I simply write the following, inside the cs_user_extra_operations.f90:

Code: Select all

call getfbr('STRUCT_WALL and y<0.5', nlelt, lstelt)
    do ilelt = 1, nlelt
       ifac = lstelt(ilelt)
       fx_1=fx_1+forstr(1,ifac)
    enddo
This seems to work fine. The problem arises when I try to print "fx_1" inside a new user file:

Code: Select all

97      format(3g17.9)
impout = impusr(100)
if (irangp.le.0) then
    open(impout,file='force_1_x.dat',position="append")
    write(impout,97) ttcabs, fx_1
    close(impout)
  endif
When I add these lines, I get a SIGSEGV during the first iteration...

Do you have any idea of the problem?

Thank you very much.

Best regards,

Daniele

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Mon Nov 18, 2019 7:44 pm
by Yvan Fournier
Hello,

Your prinf format specifies 3 values but you print only 2, which is the probable cause of the crash.

Try with 2g17.9

Regards,

Yvan

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Thu Nov 21, 2019 10:35 am
by daniele
Dear Yvan,

Thank you for your help. Unfortunately, even changing the format I get the same error.
I attach the cs_user_extra_operations.f90 I use, just in case it could help more.

Thanks a lot.

Best regards,

Daniele

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Thu Nov 21, 2019 1:03 pm
by Luciano Garelli
Hello,

Maybe the error is that the file does not exist and can not be appended the data. Try adding
open(impout,file='force_1_x.dat', status="unknown", position="append")

When I write some data to a file, in the first iteration I create the file, write some header with info about the data to be written and I close it.
Then I append the data to this file.

Regards,
Luciano

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Fri Nov 22, 2019 1:35 pm
by daniele
Dear Luciano,

Thank you for your suggestion. Adding the option does not prevent the problem to occur :(
I attached also the listing showing some details of the error.

Best regards,

Daniele

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Fri Nov 22, 2019 1:55 pm
by Luciano Garelli
Hello,

I think that the problem is not the write line.

The forstr array has dimension(3,nstrmx), I think if you want to compute the fluid forces acting on the structure you have to use the iforbr field id.

Take a look at the files cs_user_fluid_structure_interaction.f90 and cs_user_extra_operations-global_efforts.f90

Regards,

Luciano