|
[Sponsors] |
September 20, 2016, 07:54 |
Periodic Boundary Condition
|
#1 |
New Member
ZaheerAhmed
Join Date: Sep 2016
Posts: 7
Rep Power: 10 |
Hi
please help me regarding data format to save the results with periodic boundary condition. Below here are two subroutines which i am using to save data. ================================================== =================== subroutine print_fronts1(my_Fronts,my_NumFront,nf,grank,time) use module_grid use module_IO use front_lib implicit none type(Front), dimension(, pointer, intent(in) :: my_Fronts integer :: my_NumFront integer :: nf, iunit, i,grank real(8) :: time iunit=7 OPEN(UNIT=iunit,FILE=trim(out_path)//'/front'//int2text(grank,4)//int2text(nf,4)//'.dat') write(iunit,*)'variables = "x","y","z"' !,"u","v","w"' do i = 1, myNumFronts write(iunit,"('ZONE solutiontime=',1PG15.7E2,' DATAPACKING=POINT, ZONETYPE=FETRIANGLE')")time call print_1(my_Fronts(myFronts_IDs(i)),iunit,GammaInf, xh,yh,zh,dx,dy,dz,Nx,Ny,Nz,Ng,Nxt,Nyt,Nzt, & xLength,yLength,zLength) enddo close(iunit) end subroutine print_fronts1 ================================================== =================== !------------------------------------------------------------------------------------------------- subroutine print_1(this,iunit,GammaInf,xh,yh,zh,dx,dy,dz,Nx,N y,Nz,Ng,Nxt,Nyt,Nzt,xLength,yLength,zLength) ! use module_grid ! use module_IO implicit none type(Front), intent(in) :: this integer, intent(in) :: Nxt, Nyt, Nzt ! total number of cells integer, intent(in) :: Nx, Ny, Nz, Ng real(8), intent(in) :: xLength, yLength, zLength, GammaInf real(8), dimension(Nxt), intent(in) :: xh, dx real(8), dimension(Nyt), intent(in) :: yh, dy real(8), dimension(Nzt), intent(in) :: zh, dz integer :: iunit, elem, point, p1, p2, p3 real(8) :: xp(3) !--mm this%AveGamma = 0.0d0 this%CountNgbr = 0.0d0 !--mm write(iunit,"('NODES=',I6,' ,ELEMENTS=', I6)")this%PointLength, this%ElemLength !--mm !----compute the surfactant concentration at element corners do elem = 1, this%ElemLength p1=this%ElemCorner(1,elem) p2=this%ElemCorner(2,elem) p3=this%ElemCorner(3,elem) this%AveGamma(p1) = this%AveGamma(p1) + this%gammas(elem) this%AveGamma(p2) = this%AveGamma(p2) + this%gammas(elem) this%AveGamma(p3) = this%AveGamma(p3) + this%gammas(elem) this%CountNgbr(p1) = this%CountNgbr(p1) + 1.0d0 this%CountNgbr(p2) = this%CountNgbr(p2) + 1.0d0 this%CountNgbr(p3) = this%CountNgbr(p3) + 1.0d0 enddo !--mm do point = 1, this%PointLength call GetCoords(this,xp,point,xh,yh,zh,dx,dy,dz,Nx,Ny,Nz ,Ng,Nxt,Nyt,Nzt,xLength,yLength,zLength) !--mm this%AveGamma(point) = this%AveGamma(point)/this%CountNgbr(point) !--mm write(iunit,'(6e16.8e2)') modulo(xp(1),xLength), modulo(xp(2),yLength), & modulo(xp(3),zLength), this%AveGamma(point)/GammaInf enddo do elem = 1, this%ElemLength call write_integer(iunit,this%ElemCorner(1,elem),this%E lemCorner(2,elem),this%ElemCorner(3,elem)) enddo end subroutine print_1 ================================================== =================== see the result attached here with. when bubbles are boundary which is periodic the result is not good please help me to correct this. thanks alot |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Problem in setting Boundary Condition | Madhatter92 | CFX | 12 | January 12, 2016 05:39 |
Unsteady Periodic Boundary Condition | EMolina | SU2 | 0 | July 24, 2014 17:16 |
About periodic boundary condition. | kohel_11 | FLUENT | 3 | July 30, 2013 08:37 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |