MEEG 681 / MEEG481
Computer Solution of Engineering Problems
Computer Session 7

In this session we solve an unsteady water flow around a two-dimensional cylinder using FIDAP.
 


 

Step-by-Step FIDAP Instructions for Setting up the model

1. Starting the FID AP GUI:

  • cd /tmp
  • mkdir mydir (make a new directory)
  • cd mydir (Always start in a new, empty directory)
  • fidap -id 2Dcyld -gui (start a FIDAP session named 2Dcyld)
  • click the "FIDAP version window" to remove it
  • 2. Start up FI-GEN (the mesh generation module): 3. Generating the Geometry (i.e., Points, Curves and Surfaces): 4. Creating mesh:
    1. Click Mesh Edge , Select ADD
    2. Input 25 in the "Interval" box field
    3. Left click the two vertical lines connecting the points 4-1,2-3;
    4. Right click (you should see 26 nodes on each of the vertical line)
    5. Input 40 in the "Interval" box field
    6. Left click the two horizontal lines connecting the points 1-2,3-4; then right-click
    7. Input 20 in the "Interval" box field
    8. Left click the circle, Right click
    9. Select Mesh Loop , click Add Pave
    10. Left click the 4 lines connecting the points 1-2, 2-3, 3-4, 4-1 in order, then right click
    11. Left click the circle, then right click
    12. Select Mesh Face, click ADD
    13. left-click on the dark blue surface cross bar, right-click
    14. left-click on the outside square, then left-click on the inner circle, right-click
    15. Select Bndry Edge , click Add
    16. Select Layers under BOUNDARY EDGE DEFAULTS
    17. Input 0.2 in the Height 1 field, 1.1 in the Growth factor field, and 3 in the No. Layer field
    18. left-click on the mesh face boundary, right click
    19. left-click on the circle, right click (You should see Be mark near the circle)
    20. Select Mesh Face, click Mesh
    21. Click "All" under SELECT OPTION
    22. Click "Pave" under MESH FACE DEFAULTS
    23. Input "fluid" in the "Entity" box
    24. Right click in the graphical window (Now mesh is being generated, this may take a few minutes)
    5. Specifying entity names for the boundaries:
    1. Click Mesh Edge
    2. Select MESH MAP
    3. Left click the line connecting points 1 and 2
    4. Input "bottom" in the "Entity" field
    5. Right click in the graphical window
    6. Left click the line connecting points 3 and 4
    7. Input "top" in the "Entity" field
    8. Right click in the graphical window
    9. Left click the lines connecting points 4-1
    10. Input "inlet" in the "Entity" field
    11. Right click in the graphical window
    12. Left click the lines connecting points 2-3
    13. Input "outlet" in the "Entity" field
    14. Right click in the graphical window
    15. Left click the cylinder
    16. Input "cylinder" in the "Entity" field
    17. Right click in the graphical window
    18. Click END once to exit FIGEN
    6. Defining entity labels
    1. Click FIPREP, Select "Entity"
    2. Left click the question mark to select "fluid" entity
    3. Input "Fluid" in the ENTITY TYPE field, Right click ADD-ADD (REPEAT)
    4. Left click the question mark to select "bottom" entity
    5. Input "plot" in the ENTITY TYPE field, Right click ADD-ADD (REPEAT)
    6. Repeat this for the other boundary entities: "top", "inlet", "outlet", "cylinder".
    7. Specifying fluid properties
    1. Click Properties
    2. Click "DENSITY"
    3. Input 0.998 in the MODEL TYPE-CONSTANT field
    4. Click ADD
    5. Click "VISCOSITY"
    6. Input 0.01003 in the MODEL TYPE-CONSTANT field
    7. Click ADD
    8. Specifying boundary conditions
    1. Click Boundary C., Click BCNODE
    2. Right-click exclamation point next to DEGREE of FREEDON, Pick VELOCITY
    3. Right-click exclamation point next to REGION SELECTION, Pick ENTITY
    4. Left-click question mark beside REGION SELECTION field, Pick "cylinder"
    5. Right-click exclamation point next to VALUE GENERATION field, Pick Zero
    6. Right-select ADD(REPEAT)
    7. Right-click exclamation point next to DEGREE of FREEDON
    8. Pick UX
    9. Left-click question mark beside REGION SELECTION field, Pick "inlet"
    10. Right-click exclamation point next to VALUE GENERATION field
    11. Set CONST ANT to 1.0
    12. Right-select ADD(REPEAT)
    13. Right-click exclamation point next to DEGREE of FREEDON
    14. Pick UY
    15. Left-click question mark beside REGION SELECTION field, Pick "inlet"
    16. Right-click exclamation point next to VALUE GENERATION field
    17. Pick Zero, Right-select ADD (REPEAT)
    18. Left-click question mark beside REGION SELECTION field, Pick "top"
    19. Right-click exclamation point next to VALUE GENERATION field
    20. Pick Zero, Right-select ADD(REPEAT)
    21. Left-click question mark beside REGION SELECTION field, Pick "bottom"
    22. Right-click exclamation point next to VALUE GENERATION field
    23. Pick Zero, Right-select ADD
    9. Specifying the problem type
    1. Select Simulation
    2. Click EXECUTION
    3. Change EXECUTION MODE to NEWJOB
    4. Click ADD
    5. Click PROBLEM
    6. Change SIMULATION TYPE to TRANSIENT
    7. Change CONVECTIVE TERM to NONLINEAR
    8. Click ADD
    9. Click TIMEINTEGRATION
    10. Set NSTEPS=60
    11. Set TSTART=0.0
    12. Set DT=0.05
    13. Click ADD
    14. Click END to exit FIPREP
    10. Creating the Database
    1. Click CREATE
    2. Select Create
    3. Click ACCEPT
    11. Solving the problem
    1. Click RUN
    2. Pick FISOLV
    3. Pick FOREGROUND
    4. Click ACCEPT (Now relax and wait for the simulation to finish, this may take a minute or two)
    12. Get ready for post processing
    1. Click IDENT
    2. Click ACCEPT
    3. Click FIPOST
    4. Click ACCEPT
    13. Visualizing the vector velocity field
    1. Click Vector
    2. Click Accept
    14. Plotting streamlines
    1. Click Utility
    2. Select TIMESTEP
    3. Set to desired time step, click ADD
    4. Click Contour
    5. Right-click exclamation point next to DEGREE of FREEDON
    6. Pick STREAMLINE
    7. Input 60 in the CONTOUR LEVELS-AUTOMATIC field (this will draw 60 contour levels in stead of 10 by default).
    8. Click ACCEPT (You can clearly see the re-circulation region)


    15. Plot and read results on a line

    1. PLOT-LINE: Degree of freedom = UX, LINE DEFINITION=PVECTOR, ACCEPT
    2. INPUT: 0.,2.5,0.0,1.,0.0,0.0
    3. Also check the results in the *.FIOUT file


    16. Compute drag force on cylinder

    1. Go to FIPOST
    2. Computation - STRSPRINT - Stress Type=Total, Sides definition =Entity.Cylinder, Accept
    3. In the History window, the X Total Force is the drag.


    17. Exit FIDAP (always remember to exit FIDAP properly)

    1. Click END to exit FIPOST
    2. Click END one more time to exit FIDAP
    3. Answer YES to the EXIT PROMPT question
    Using Gambit to model the problem with a different mesh
    / Journal File for GAMBIT 1.3.0
    / File opened for write Wed Apr  4 11:19:03 2001.
    identifier name "cylind" new saveprevious
    undo begingroup
    vertex create coordinates 0 0 0
    undo endgroup
    undo begingroup
    vertex create coordinates 5 0 0
    undo endgroup
    undo begingroup
    vertex create coordinates 10 0 0
    undo endgroup
    undo begingroup
    vertex create coordinates 10 5 0
    undo endgroup
    undo begingroup
    vertex create coordinates 5 5 0
    undo endgroup
    undo begingroup
    vertex create coordinates 0 5 0
    undo endgroup
    undo begingroup
    /
    vertex create coordinates 2.5 2.510 0
    / This introduce a little bit of asymmetry to the domain to help generate
    / vortex shedding
    /
    undo endgroup
    edge create radius 0.5 startangle 45 endangle 135 center "vertex.7" xyplane arc
    edge create radius 0.5 startangle 135 endangle 225 center "vertex.7" xyplane arc
    edge create radius 0.5 startangle 225 endangle 315 center "vertex.7" xyplane arc
    edge create radius 0.5 startangle 315 endangle 45 center "vertex.7" xyplane arc
    vertex connect "vertex.1" "vertex.2" "vertex.3" "vertex.4" "vertex.5" \
      "vertex.6" "vertex.7" "vertex.8" "vertex.9" "vertex.10" "vertex.11" \
      "vertex.12" "vertex.13" "vertex.14" "vertex.15" real
    edge create straight "vertex.1" "vertex.2" "vertex.3" "vertex.4" "vertex.5" \
      "vertex.6"
    edge create straight "vertex.6" "vertex.1"
    edge create straight "vertex.5" "vertex.2"
    edge create straight "vertex.6" "vertex.9"
    edge create straight "vertex.5" "vertex.8"
    edge create straight "vertex.2" "vertex.13"
    edge create straight "vertex.11" "vertex.1"
    face create wireframe "edge.10" "edge.15" "edge.2" "edge.12" real
    face create wireframe "edge.12" "edge.1" "edge.13" "edge.9" real
    face create wireframe "edge.4" "edge.14" "edge.11" "edge.13" real
    face create wireframe "edge.14" "edge.3" "edge.15" "edge.5" real
    face create wireframe "edge.6" "edge.7" "edge.8" "edge.11" real
    undo begingroup
    edge picklink "edge.10"
    edge mesh "edge.10" successive ratio1 0.97 ratio2 0.97 intervals 40
    undo endgroup
    undo begingroup
    edge picklink "edge.11" "edge.7"
    edge mesh "edge.7" "edge.11" successive ratio1 0.98 ratio2 0.98 intervals 60
    undo endgroup
    undo begingroup
    edge picklink "edge.4"
    edge mesh "edge.4" successive ratio1 0.99 ratio2 0.99 intervals 60
    undo endgroup
    undo begingroup
    edge picklink "edge.3" "edge.2" "edge.1"
    edge mesh "edge.1" "edge.2" "edge.3" successive ratio1 1 intervals 40
    undo endgroup
    undo begingroup
    edge picklink "edge.12"
    edge mesh "edge.12" successive ratio1 0.97 intervals 40
    undo endgroup
    undo begingroup
    edge picklink "edge.13"
    edge mesh "edge.13" successive ratio1 0.97 intervals 40
    undo endgroup
    undo begingroup
    edge picklink "edge.15"
    edge mesh "edge.15" successive ratio1 1.03093 intervals 40
    undo endgroup
    undo begingroup
    edge picklink "edge.14"
    edge mesh "edge.14" successive ratio1 0.97 intervals 40
    undo endgroup
    undo begingroup
    edge picklink "edge.5" "edge.9"
    edge mesh "edge.9" "edge.5" successive ratio1 1 intervals 40
    undo endgroup
    undo begingroup
    edge picklink "edge.6" "edge.8"
    edge mesh "edge.8" "edge.6" successive ratio1 1 intervals 40
    undo endgroup
    face mesh "face.1" "face.2" "face.3" "face.4" "face.5" map size 1
    face delete "face.5" onlymesh
    undo begingroup
    edge delete "edge.8" keepsettings onlymesh
    edge mesh "edge.8" successive ratio1 0.99 intervals 50
    undo endgroup
    undo begingroup
    edge delete "edge.6" keepsettings onlymesh
    edge mesh "edge.6" successive ratio1 1.0101 intervals 50
    undo endgroup
    face mesh "face.5" map size 1
    solver select "FIDAP"
    physics create "fluid" ctype "FLUID" face "face.1" "face.2" "face.3" "face.4" \
      "face.5"
    physics create "inlet" btype "PLOT" edge "edge.10"
    physics create "top" btype "PLOT" edge "edge.9" "edge.8"
    physics create "bottom" btype "PLOT" edge "edge.5" "edge.6"
    physics create "outlet" btype "PLOT" edge "edge.7"
    physics create "cylinder" btype "PLOT" edge "edge.4" "edge.1" "edge.2" \
      "edge.3"
    export fidap "cylind.FDNEUT"
    / File closed at Wed Apr  4 11:53:02 2001, 15.56 cpu second(s), 4840040 maximum memory.
    



    FIPREP file for the unsteady case

    /
    /          CONVERSION OF NEUTRAL FILE TO FIDAP Database
    /
    FICONV( NEUTRAL )
    INPUT( FILE="cylind.FDNEUT" )
    OUTPUT( DELETE )
    END
    /
    /
    TITLE
    cylind
    /
    FIPREP(  )
    /
    EXECUTION( ADD, NEWJ )
    /
    PROBLEM( ADD, 2-D, INCO, TRAN, LAMI, NONL, NEWT, MOME, ISOT, FIXE, SING )
    /
    / TIMEINTEGRATION( ADD, BACK, NSTE = 201, TSTA = 0, DT = 0.25, FIXE )
    / TIMEINTEGRATION( ADD, BACK, NSTE = 201, TSTA = 50.25, DT = 0.25, FIXE )
    TIMEINTEGRATION( ADD, BACK, NSTE = 401, TSTA = 100.50, DT = 0.25, FIXE )
    SOLUTION( S.S. = 50, VELCONV = .001, RESCONV = .001)
    /
    POSTPROCESS(NBLOCKS=1)
    1 401 4
    /
    DATAPRINT( ADD, CONT )
    PRINTOUT( ADD, NONE, BOUN )
    /
    ENTITY( ADD, NAME = "fluid", FLUI )
    ENTITY( ADD, NAME = "bottom", PLOT )
    ENTITY( ADD, NAME = "top", PLOT )
    ENTITY( ADD, NAME = "inlet", PLOT )
    ENTITY( ADD, NAME = "outlet", PLOT )
    ENTITY( ADD, NAME = "cylinder", PLOT )
    /
    DENSITY( ADD, SET = 1, CONS = 0.998 )
    VISCOSITY( ADD, SET = 1, CONS = 0.01003 )
    /
    / ICNODE( ADD, VELO, ZERO, ENTI = "fluid", X, Y, Z )
    / To read steady-state flow field as the initial condition:
    / change *.FDPOST to *.FDREST
    / and then
    ICNO (VELO, READ)
    /
    BCNODE( ADD, VELO, ENTI = "cylinder", ZERO, X, Y, Z )
    BCNODE( ADD, UY, ENTI = "inlet", ZERO )
    BCNODE( ADD, UX, ENTI = "inlet", CONS = 1.00 )
    BCNODE( ADD, UY, ENTI = "bottom", ZERO )
    BCNODE( ADD, UY, ENTI = "top", ZERO )
    /
    END(  )
    


    CPU TIME for the runs on mahler:
    First 201 steps: 6528 s
    Next 201 steps: 20398 s
    Next 401 steps: 40496 s

    Print a hard copy of FIPOST visualizations Results for unsteady simulations
    Re = 100 (Spring 2001)
    Re = 200 (Spring 2002)


    How to start a run with initial field specified as the last field of a previous run?
    / change *.FDPOST to *.FDREST
    / and then
    ICNO (VELO, READ)
    /