<div dir="ltr"><div><div><div>Hello,<br><br></div>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:<br><br>subroutine usrdat2<br> include 'SIZE'<br>
include 'TOTAL'<br> common /ogeom/ ox(lx1,ly1,lz1,lelv)<br> $ , oy(lx1,ly1,lz1,lelv)<br> $ , oz(lx1,ly1,lz1,lelv)<br><br> diam = 1.0<br> one = 1.<br> pi = 4.*atan(one)<br>
<br> Rcurv = 3 !curvature of the pipe<br><br> z0 = 0.<br> z1 = pi*Rcurv !equal to area of the curved pipe<br> call rescale_x (zm1,z0,z1)<br><br> rad = diam/2.<br> radm = -rad<br> call rescale_x (xm1,radm,rad)<br>
call rescale_x (ym1,radm,rad)<br><br> n = nx1*ny1*nz1*nelv<br> call copy(ox,xm1,n)<br> call copy(oy,ym1,n)<br> call copy(oz,zm1,n)<br><br> do i=1,n ! preset offset twist<br>
x = xm1(i,1,1,1)<br> y = ym1(i,1,1,1)<br> z = zm1(i,1,1,1)<br> theta = z/Rcurv<br> zm1 = Rcurv*sin(theta)<br> ym1(i,1,1,1) = y + Rcurv*cos(theta)<br> enddo<br><br><br>
param(59) = 1. ! All elements deformed<br> ifxyo = .true.<br> <br> return<br> end<br>c-----------------------------------------------------------------------<br><br></div>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?<br>
<br></div>Thanks,<br>Ami<br></div>