[Nek5000-users] mapping straight pipe to curved pipe
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Nov 14 16:56:03 CST 2013
Hello,
I am trying to change the usrdat2 in example pipe(helix) to make curved
pipe with defined curvature. I changed the .usr file like this:
subroutine usrdat2
include 'SIZE'
include 'TOTAL'
common /ogeom/ ox(lx1,ly1,lz1,lelv)
$ , oy(lx1,ly1,lz1,lelv)
$ , oz(lx1,ly1,lz1,lelv)
diam = 1.0
one = 1.
pi = 4.*atan(one)
Rcurv = 3 !curvature of the pipe
z0 = 0.
z1 = pi*Rcurv !equal to area of the curved pipe
call rescale_x (zm1,z0,z1)
rad = diam/2.
radm = -rad
call rescale_x (xm1,radm,rad)
call rescale_x (ym1,radm,rad)
n = nx1*ny1*nz1*nelv
call copy(ox,xm1,n)
call copy(oy,ym1,n)
call copy(oz,zm1,n)
do i=1,n ! preset offset twist
x = xm1(i,1,1,1)
y = ym1(i,1,1,1)
z = zm1(i,1,1,1)
theta = z/Rcurv
zm1 = Rcurv*sin(theta)
ym1(i,1,1,1) = y + Rcurv*cos(theta)
enddo
param(59) = 1. ! All elements deformed
ifxyo = .true.
return
end
c-----------------------------------------------------------------------
but it comes out with some error associated with vanishing jacobian! I
would ask that what is the problem with my modification on mapping straight
pipe?
Thanks,
Ami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20131114/79d60a85/attachment.html>
More information about the Nek5000-users
mailing list