Page 2 of 4
Re: effortts calculation (F=PxS)
Posted: Wed Sep 05, 2012 1:44 pm
by stage75
effectively Yvan I did what James said. I modified the subroutine USPROJ.F90 as follows :
Code: Select all
if (ineedf.eq.1) then
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
call getfbr('204', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = 1, ndim
xfor(ii) = xfor(ii) + ra(iforbr + (ifac-1)*ndim + ii-1)
enddo
enddo
Then After the convergence I see nothing in the post processing menu??
Where I need retrieve the result of this calculation??
Thank's for all
Re: effortts calculation (F=PxS)
Posted: Wed Sep 05, 2012 3:48 pm
by JamesMcNaughton
Yeah like Yvan says you have what you need to calculate the moment so you just need to print your result to a file, if it's just a number then you can put it in the listing, for example:
Code: Select all
write(nfecra,*)xfor(1),xfor(2),xfor(3)
Or could put this in a specific file, look at the "profile" example in usproj if you're not familiar with doing this in fortran.
Re: effortts calculation (F=PxS)
Posted: Wed Sep 05, 2012 4:44 pm
by stage75
THank's James,
I modified the usproj subroutine as you explain but I didn't have anything concerning the forces in the "listing"?
Code: Select all
if (ineedf.eq.1) then
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
call getfbr('Face_201', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = 1, ndim
xfor(ii) = xfor(ii) + ra(iforbr + (ifac-1)*ndim + ii-1)
write(nfecra,*)xfor(1),xfor(2),xfor(3)
enddo
enddo
if (irangp.ge.0) then
call parrsm(ndim,xfor)
endif
endif
Re: effortts calculation (F=PxS)
Posted: Wed Sep 05, 2012 5:08 pm
by JamesMcNaughton
Without knowing more about the set-up it's just a guess to the problem.. it's possible you are running in parallel and Face_201 is not on process 0 (the process that writes to the listing) and so you will never enter the loop.
In your example xfor is the sum of forces, the parrsm sums across all processes, so you need to place after that call, for example:
Code: Select all
if (ineedf.eq.1) then
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
call getfbr('Face_201', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = 1, ndim
xfor(ii) = xfor(ii) + ra(iforbr + (ifac-1)*ndim + ii-1)
enddo
enddo
if (irangp.ge.0) then
call parrsm(ndim,xfor)
endif
if (irangp.le.0) then
write(nfecra,*)xfor(1),xfor(2),xfor(3)
endif
endif
Try that and if you still have nothing I recommend posting your full usproj and listing which will help determine problems.
Also note this is calculating the global sum in the x,y,z directions, not the moment. The moment requires cross product with the distance vector.
James
Re: effortts calculation (F=PxS)
Posted: Thu Sep 06, 2012 11:20 am
by stage75
Hi James,
I copied / pasted what you gave me and I had nothing on the "listing" concerning forces!
Below attached the file "listing" and "usproj"!
Re: effortts calculation (F=PxS)
Posted: Thu Sep 06, 2012 11:39 am
by JamesMcNaughton
It is in the listing you provide, line 811 is the first instance.
Re: effortts calculation (F=PxS)
Posted: Thu Sep 06, 2012 11:47 am
by stage75
Thank's a lot James
The is three value ( -7359.1764031134608 2.21572025732103550E-002 337.84818969745351)
So Fx = -7359.1764031134608,
Fy = 2.21572025732103550E-002
Fz = 337.84818969745351
That's right I guess?
Re: effortts calculation (F=PxS)
Posted: Thu Sep 06, 2012 5:29 pm
by JamesMcNaughton
Yes, for the first time-step.
Re: effortts calculation (F=PxS)
Posted: Thu Sep 06, 2012 9:01 pm
by stage75
Hi James,
Thanks a lot, really you helped me a lot
without your help I wouldn't have solved this problem of forces,
Thanks
Re: effortts calculation (F=PxS)
Posted: Fri Sep 07, 2012 2:22 pm
by stage75
Hi,
is there a relation that allows us to calculate the moment in subroutine instead of the hand calculation
Thanks