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
subroutine not over-riding GUI boundary conditions - ALE
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: subroutine not over-riding GUI boundary conditions - ALE
Hello,
Did you try running your case in version 4.0 ? There have been quite a few fixes since version 3.1, which was a short-cycle development version, and is not maintained anymore.
Regards,
Yvan
Did you try running your case in version 4.0 ? There have been quite a few fixes since version 3.1, which was a short-cycle development version, and is not maintained anymore.
Regards,
Yvan
Re: subroutine not over-riding GUI boundary conditions - ALE
Hi Yvan,
Thanks for the response. I've not tried yet no, as 3.1 is the version we have working on our cluster.
But does it seem like I am doing the right thing? I read that in some cases the subroutines don't override the GUI, for example you can't reclassify a boundary type. But it should be able to change the fixed displacement amount no?
Does version 4 include free surface capabilities through the GUI?
Thanks again
Susan
Thanks for the response. I've not tried yet no, as 3.1 is the version we have working on our cluster.
But does it seem like I am doing the right thing? I read that in some cases the subroutines don't override the GUI, for example you can't reclassify a boundary type. But it should be able to change the fixed displacement amount no?
Does version 4 include free surface capabilities through the GUI?
Thanks again
Susan
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: subroutine not over-riding GUI boundary conditions - ALE
Hello,
Most subroutines override the GUI, including boundary conditions. The only exceptions are for the choice of specific physical models, or turbulence model.
V4 has some ALE possibilities through the GUI, but nothing specific for free surfaces.
Regards,
Yvan
Most subroutines override the GUI, including boundary conditions. The only exceptions are for the choice of specific physical models, or turbulence model.
V4 has some ALE possibilities through the GUI, but nothing specific for free surfaces.
Regards,
Yvan
-
- Posts: 48
- Joined: Wed Mar 14, 2012 10:06 am
Re: subroutine not over-riding GUI boundary conditions - ALE
Hello,
In fact in version 4.0 you can apply a free surface boundary condition directly in the GUI, if you have switch on the ALE module. For this boundary condition to be valid, you also need to correctly give the gravity vector. It is possible to do it also in fortran subroutines with the "itypfb" code "ifresf" (check in the doxygen doc.).
Best regards
Martin
In fact in version 4.0 you can apply a free surface boundary condition directly in the GUI, if you have switch on the ALE module. For this boundary condition to be valid, you also need to correctly give the gravity vector. It is possible to do it also in fortran subroutines with the "itypfb" code "ifresf" (check in the doxygen doc.).
Best regards
Martin
Re: subroutine not over-riding GUI boundary conditions - ALE
Hi Martin, Yvan
I have access to v4 now so I will give it a go and report back. Thanks for the help!
Susan
I have access to v4 now so I will give it a go and report back. Thanks for the help!
Susan
Re: subroutine not over-riding GUI boundary conditions - ALE
Hi Martin,
I am still having the same problem regarding the subroutines not over-writing what I have set in the GUI for the case of a cylinder oscillating with a fixed displacement (from the C_S VIV tutorial). I wonder if you have time to have a look at what I am doing. I will attach my xml file and the subroutine I have used (usalcl)
In the xml file I set boundary 7 as a wall with a fixed displacement of 0. Then in the user subroutine I am trying to override this to a sinusoidal displacement. But it isn't overriding it.
Any help or ideas much appreciated,
Susan
I am still having the same problem regarding the subroutines not over-writing what I have set in the GUI for the case of a cylinder oscillating with a fixed displacement (from the C_S VIV tutorial). I wonder if you have time to have a look at what I am doing. I will attach my xml file and the subroutine I have used (usalcl)
In the xml file I set boundary 7 as a wall with a fixed displacement of 0. Then in the user subroutine I am trying to override this to a sinusoidal displacement. But it isn't overriding it.
Any help or ideas much appreciated,
Susan
- Attachments
-
- oscillating_cylinder.xml
- (7.29 KiB) Downloaded 312 times
-
- usalcl.f90
- (19.17 KiB) Downloaded 332 times
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: subroutine not over-riding GUI boundary conditions - ALE
Hello,
Your version of usalcl is certainely not going to do much if you leave the loop on faces inside an "if .false." clause. In addition, you are selecting faces with reference "1", not "7".
And please, remove or edit the comments: mentioning "color/group" 5 and doing things on "color/group" 1 means you are not doing what is described. This make comments more dangerous than useful. You are certainly not the only user to do this (probably more than 50% of people do this) but I absolutely hate it when people do this, as this is bad practice, and can lead to wasting time understanding things in more complex cases (this rant is a reminder for almost everyone, not specifically you).
Best regards,
Yvan
Your version of usalcl is certainely not going to do much if you leave the loop on faces inside an "if .false." clause. In addition, you are selecting faces with reference "1", not "7".
And please, remove or edit the comments: mentioning "color/group" 5 and doing things on "color/group" 1 means you are not doing what is described. This make comments more dangerous than useful. You are certainly not the only user to do this (probably more than 50% of people do this) but I absolutely hate it when people do this, as this is bad practice, and can lead to wasting time understanding things in more complex cases (this rant is a reminder for almost everyone, not specifically you).
Best regards,
Yvan
Re: subroutine not over-riding GUI boundary conditions - ALE
Hi Martin,
You mentioned that the free-surface module was available through the GUI in v4. I see that it is an option when specifying boundary conditions but then I cannot find anywhere where I could control it as such. I mean, if I wanted to specify an initial displacement. Is that possible in the GUI or not?
I am looking to model a standing wave to start with. Would I be better looking at an internal coupled boundary in this case?
Thanks
You mentioned that the free-surface module was available through the GUI in v4. I see that it is an option when specifying boundary conditions but then I cannot find anywhere where I could control it as such. I mean, if I wanted to specify an initial displacement. Is that possible in the GUI or not?
I am looking to model a standing wave to start with. Would I be better looking at an internal coupled boundary in this case?
Thanks