Comet  force calculation
Using Comet
i iwanted to calculate the total force in given direction on a rectangular body floating half draft in water. without any motion, the weight should kinda balance the pressure force. i summed the forces as follows: fx=fy=fz=0. do k=nsr(ir),ner(ir) fx=fx+(btr(1,k)+pb(k)*sb(1,k))*sbm fy=fy+(btr(2,k)+pb(k)*sb(2,k))*sbm fz=fz+(btr(3,k)+pb(k)*sb(3,k))*sbm end do example in post.f divides by /sbm to calculate force per unit area! (note i have the if loops taken care of) the weight was calculated as density*9.81*length*geomsc * beam*geomsc * thickness*geomsc my problem is the force could not balance the weight. i guess i have problem with calculating either of them. Can anyone point me to what i am doing wrong? thanks you 
Re: Comet  force calculation
Here you are:
if (ir.eq.2) then Fx=0. Fy=0. Fz=0. do k=nsr(ir),ner(ir) Fx = Fx + pb(k)*sb(1,k) + btr(1,k) Fy = Fy + pb(k)*sb(2,k) + btr(2,k) Fz = Fz + pb(k)*sb(3,k) + btr(3,k) end do end if BTW, you can check if the output is the same as the regionwise forces summary you will find at the end of the simulation in the .his2file. 
Re: Comet  force calculation
Thanks. that was really helpful!

Re: Comet  force calculation
4xF: i am having big swings in the pressure force values. i plotted fx or fy or fz versus time. i dont know what is going on. the forces are not sinusoidal even though we have excitation in waves. i guess it is because of the swings.. how can i get 'smooth' curves? i'd appreciate your help.
by the way i am doing fluid solid interaction with a coupled body motion. thanks, t.c 
Re: Comet  force calculation
Because a) you do not use enough outer iterations to allow the flow to converge b) your time integration scheme may be explicit and hence prone to oscillatory behaviour in the integration of the movement when the time step used is large

Re: Comet  force calculation
Thanks for your willingness to help! you may be right. since i use the velocity from the time integration to apply as B.C it could be possible my time integration can affect this. i am using first order Euler time int. but i average t and (t+1) force, to calculate velocity and average t and (t+1) velocities to calculate displacement but i apply current velocities as BC (kind of CrankNicholson). i saw this algo in a paper. i tried the av velocities but same.. do you know of any time int method that has worked well elsewhere or any other advice in this regard? thanks a bunch

Re: Comet  force calculation
I think I know the paper (resp. the PhD thesis) you are refering to. It is stated in there that the method is a kind of CranckNicholson. The fact is that the integration method is explicit in time and of first order and will be prone to give you oscillations for the forces if the fluctuations in forces due to fluid flow have a period which in about the same as the time step you use for integration. There are many solutions:  reduce the time step (which may not be desirable)  converge the fluid flow (forces should change less from one timestep to another)  smooth out any oscillations by underrelaxing the movement (which is in fact adding additional inertia to the rigid body system).
Have fun... 
Re: Comet  force calculation
Thanks. i have taken note of your advise and i will try it. thanks again!

amplitude of displacement
the heave displacement is sinusoidal but is modulated. the peaks are not the same. i have some peaks about twice the others, and the pattern repeats.for instance with say 2.5seconds wave period, the pattern repeats like every approx 10 seconds. i tried different wave amplitudes and periods but same. also, i tried Newmark time integration scheme as well as other time integration schemes but same result. i expect the peaks to be equal or fairly so. the only thing left for me to try now is different time steps . i have been trying to figure out what is happening without much success..any clues would be appreciated!

Re: amplitude of displacement
If you have the displacement velocity of the body in water (say V) and you calculation box has the size L, I am pretty sure that the "weird" wave period is something related to L/V, which means that you have some waves autoamplified by your computational domain (which is finite is size) and the prescribed body movement (consider it as it were yourself making waves in a bath).
Take care... 
Re: amplitude of displacement
Thanks. i think you are right. there may be reflected waves in there. i have an all wall boundary with a wavemaker on one side and no beach. i used much larger cells on the boundaries thinking there will be diffusion but apparently that did not help much. i dont know how to implement a beach or a wave absorbing boundary in Comet. from all indications it looks like that cannot be done easily using this software. is that correct?

All times are GMT 4. The time now is 08:47. 