subroutine not over-riding GUI boundary conditions - ALE
Posted: Mon Oct 12, 2015 5:18 pm
Hello,
I am using CS v3.1.3. I am trying to recreate the tutorial on the use of the ALE module through a combination of both the GUI and the user subroutines. The aim is to use it to model a free surface, but since I can't set this via the GUI I am learning to use the subroutines.
So. I have set the tutorial up, as specified on the website for a cylinder oscillating perpendicular to the free stream flow. I have chosen a fixed displacement instead of the internal interaction. To see whether I am working the subroutines correctly I have set the cylinder to be 'fixed displacement' but with 0 displacement. I am then trying to override this with usalcl to be a sinusoidal displacement.
I have copied usalcl into the SRC directory and altered it to include the motion for the cylinder. Code at the bottom. I then run the simulation through the GUI but there is no movement (yes I have transient coords chosen). The only way I can get it to work is if I put the displacement directly into eh GUI, which is fine for the tutorial but not when I come to use a free surface.
Am I missing some vital step? Should I be altering more than usalcl for this?
thanks in advance for your help!
'double precision delta, deltaa, Sr_a, U0, fchord, a, freq, omega
! Calculation of displacement at current time step
Sr_a = 0.16d0 !Strouhal by amplitude
U0 = 0.43d0 !Current
fchord = 0.05d0 !chord length
a = 0.5*fchord; !amplitude
freq = Sr_a*U0/2.0d0/a !frequency
omega = 2*3.141596d0*freq !angular frequency
delta = a*sin(omega*ntcabs) ! fixed displacement with time. ttcabs = current physical time value.
! For boundary faces of color 1 assign a fixed displacement on nodes
if (.false.) then
call getfbr('1', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = ipnfbr(ifac), ipnfbr(ifac+1)-1
inod = nodfbr(ii)
if (impale(inod).eq.0) then
depale(inod,1) = 0.d0
depale(inod,2) = delta
depale(inod,3) = 0.d0
impale(inod) = 1
endif
enddo
enddo
endif
I am using CS v3.1.3. I am trying to recreate the tutorial on the use of the ALE module through a combination of both the GUI and the user subroutines. The aim is to use it to model a free surface, but since I can't set this via the GUI I am learning to use the subroutines.
So. I have set the tutorial up, as specified on the website for a cylinder oscillating perpendicular to the free stream flow. I have chosen a fixed displacement instead of the internal interaction. To see whether I am working the subroutines correctly I have set the cylinder to be 'fixed displacement' but with 0 displacement. I am then trying to override this with usalcl to be a sinusoidal displacement.
I have copied usalcl into the SRC directory and altered it to include the motion for the cylinder. Code at the bottom. I then run the simulation through the GUI but there is no movement (yes I have transient coords chosen). The only way I can get it to work is if I put the displacement directly into eh GUI, which is fine for the tutorial but not when I come to use a free surface.
Am I missing some vital step? Should I be altering more than usalcl for this?
thanks in advance for your help!
'double precision delta, deltaa, Sr_a, U0, fchord, a, freq, omega
! Calculation of displacement at current time step
Sr_a = 0.16d0 !Strouhal by amplitude
U0 = 0.43d0 !Current
fchord = 0.05d0 !chord length
a = 0.5*fchord; !amplitude
freq = Sr_a*U0/2.0d0/a !frequency
omega = 2*3.141596d0*freq !angular frequency
delta = a*sin(omega*ntcabs) ! fixed displacement with time. ttcabs = current physical time value.
! For boundary faces of color 1 assign a fixed displacement on nodes
if (.false.) then
call getfbr('1', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = ipnfbr(ifac), ipnfbr(ifac+1)-1
inod = nodfbr(ii)
if (impale(inod).eq.0) then
depale(inod,1) = 0.d0
depale(inod,2) = delta
depale(inod,3) = 0.d0
impale(inod) = 1
endif
enddo
enddo
endif