CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

problem in mesh and FORTRAN 77 code

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By FMDenaro
  • 1 Post By mostanad

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2016, 14:01
Default problem in mesh and FORTRAN 77 code
  #1
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12
mostanad is on a distinguished road
Hello everybody
my master give me a fortran code that can produce for me a arbitrary shape and grid it. the code is about 3000 lines and i don't know so about it. my problem is the algorithm of giding tha it used. because i want change it. my master say that it solve laplace equation. also maybe use "body generating cordinate system" technique for meshing. did any body hear these names?. is it a known algorithm. is any book that can help me? I write some lines of code to see it.
Code:
      WRITE(*,1)NSEC
    1 FORMAT(/,10X,'SPECIFY NO OF SECTIONS FOR',
     1             ' NORTH BOUNDARY, (MAX  ',I2,' )')
      READ(*,*)LSCN
      DO L=1,LSCN
      WRITE(*,2)L
    2 FORMAT(/,'SECTION',2X,I2,5X,'IF LINEAR TYPE 1,  ',
     1                   'IF CIRCULAR ARC 2')
      READ(*,*)ISHP(L)
      IF(L.EQ.1)THEN
      WRITE(*,3)L
    3 FORMAT(/,5X,'INPUT STARTING X POSITION FOR SECTION  ',I3)
      READ(*,*)X1(L)
      WRITE(*,4)L
    4 FORMAT(/,5X,'INPUT STARTING Y POSITION FOR SECTION  ',I3)
      READ(*,*)Y1(L) 
      ENDIF
      IF(L.GT.1)THEN
      X1(L)=X2(L-1)
      Y1(L)=Y2(L-1)
      ENDIF
      WRITE(*,5)L
    5 FORMAT(/,5X,'INPUT  X POSITION AT END OF SECTION  ',I3)
      READ(*,*)X2(L)
      WRITE(*,6)L
    6 FORMAT(/,5X,'INPUT  Y POSITION AT END OF SECTION  ',I3)
      READ(*,*)Y2(L) 
      IF(ISHP(L).EQ.2)THEN
      WRITE(*,7)
    7 FORMAT(/,5X,'SPECIFY ANGLE OF ARC IN DEGREES')
      READ(*,*)THT(L)
      THT(L)=3.142*THT(L)/180.
      WRITE(*,8)
    8 FORMAT(/,5X,'FOR CONVEX ARC TYPE 1 AND FOR CONCAVE 2')
      READ(*,*)IARC(L)
      END IF
      END DO
   10 CONTINUE
      DO L=1,LSCN
      WRITE(*,9)L
    9 FORMAT(//,10X,'SECTION',3X,I2,5X,'SPECIFY NUMBER OF  INTERVALS')
      READ(*,*)LSTP(L)
      LSTPN(L)=LSTP(L)
      ENDDO
      LSTPT=LSTP(1)
      DO 200 L=2,LSCN
      LSTPT=LSTPT+LSTP(L)
  200 CONTINUE
      MD=MI-LSTPT
C      IF((LSTPT+1).NE.MI) THEN
      IF(MD.NE.1)THEN
      WRITE(*,11)LSTPT,MI
   11 FORMAT(/,3X,'** ERROR',5X,'INTERVALS ',I2,5X,'POINTS ',I2,3X,
     1       '***')
      GO TO 10
      END IF
      NCOUNT=1
      XCN(1)=X1(1)
      YCN(1)=Y1(1)
      DO L=1,LSCN
      IF(ISHP(L).EQ.1) THEN
      DO LL=1,LSTP(L)
      NCOUNT=NCOUNT+1
      XCN(NCOUNT)=XCN(NCOUNT-1)+ (X2(L)-X1(L))/FLOAT(LSTP(L))
      YCN(NCOUNT)=YCN(NCOUNT-1)+ (Y2(L)-Y1(L))/FLOAT(LSTP(L))
      ENDDO
      ENDIF
      IF(ISHP(L).EQ.2)THEN
       XM=.5*(X1(L)+X2(L))
       YM=.5*(Y1(L)+Y2(L))
      S1=SQRT((X2(L)-XM)**2+(Y2(L)-YM)**2)
      R=S1/SIN(.5*THT(L))
      EL1=SQRT(R*R-S1*S1)
      ELSA=EL1/S1
      XCEN1=XM+ELSA*(YM-Y1(L))
      YCEN1=YM-ELSA*(XM-X1(L))
      XCEN2=XM-ELSA*(YM-Y1(L))
      YCEN2=YM+ELSA*(XM-X1(L))
      IF(IARC(L).EQ.1)THEN
      IF(YCEN1.GE.YM)THEN
      YCEN=YCEN1
      XCEN=XCEN1
best regards.
mostanad is offline   Reply With Quote

Old   September 5, 2016, 14:50
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Give a look to this book

http://www.erc.msstate.edu/publicati...ook/chap06.php
FMDenaro is offline   Reply With Quote

Old   September 5, 2016, 14:59
Default
  #3
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12
mostanad is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
thanks
do you know this algorithm? or you say "this algorithm might be exist in this book"
mostanad is offline   Reply With Quote

Old   September 5, 2016, 15:29
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
As you wrote "Laplace equation" you should see it in the chapter of Elliptic grid generation
ssh123 likes this.
FMDenaro is offline   Reply With Quote

Old   September 5, 2016, 16:26
Default
  #5
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12
mostanad is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
As you wrote "Laplace equation" you should see it in the chapter of Elliptic grid generation
thanks alot Prof Denaro
FMDenaro likes this.
mostanad is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fortran code to read mesh HaKu Main CFD Forum 3 December 15, 2020 14:13
how can i find source fortran code for moving mesh? big-bang Main CFD Forum 0 December 3, 2015 21:04
gmsh2su2 mesh converter Fortran source code ceanwang SU2 1 February 20, 2013 03:17
biCGSTAB Fortran code, unstructured mesh Nico Main CFD Forum 4 September 12, 2006 12:12
Moving Mesh Problem in Unix Platform Arnab Siemens 3 August 16, 2004 09:59


All times are GMT -4. The time now is 14:14.