Skip to content

Commit

Permalink
reduce the size of the Navier-Stokes lid-driven cavity example so tha…
Browse files Browse the repository at this point in the history
…t the debug nightly test should take ~20 minutes.
  • Loading branch information
dladd committed Jul 30, 2015
1 parent df1c1db commit 555452e
Show file tree
Hide file tree
Showing 6 changed files with 17,315 additions and 65,669 deletions.
18 changes: 12 additions & 6 deletions FluidMechanics/NavierStokes/LidDrivenCavity/LidDriven.py
Expand Up @@ -375,12 +375,14 @@ def LidDriven(numberOfElements,cavityDimensions,lidVelocity,viscosity,density,
#==========================================================

dimensions = [1.0,1.0]
elementResolutions = [20]
ReynoldsNumbers = [2500]
elementResolutions = [10]
ReynoldsNumbers = [1000]
lidVelocity = [1.0,0.0]
density = 1.0
basisList = [quadraticBasis,linearBasis]
RBSTypes = [True,False]
timeIncrement = 0.1
stopTime = 100.001
fdJacobian = False
analyticLidVelocity = True
# Note: viscosity will be calculated based on specified Reynolds number
Expand All @@ -390,14 +392,18 @@ def LidDriven(numberOfElements,cavityDimensions,lidVelocity,viscosity,density,

#Check for command line arguments- used for nightly test on GFEM & RBS code
if len(sys.argv) > 1:
if len(sys.argv) > 2:
sys.exit('Error: too many arguments- currently only accepting 1 option: choose "RBS" or "GFEM"')
if len(sys.argv) > 4:
sys.exit('Error: too many arguments- currently only accepting 3 options: "RBS" or "GFEM", time increment, stop time')
if sys.argv[1] == 'RBS':
RBSTypes = [True]
elif sys.argv[1] == 'GFEM':
RBSTypes = [False]
else:
sys.exit('Error: unknown argument- currently only accepting 1 option: choose "RBS" or "GFEM"')
sys.exit('Error: unknown argument for the problem type: choose "RBS" or "GFEM"')
if len(sys.argv) > 2:
timeIncrement = float(sys.argv[2])
if len(sys.argv) > 3:
stopTime = float(sys.argv[3])

runtimes = []
for elemRes in elementResolutions:
Expand All @@ -408,7 +414,7 @@ def LidDriven(numberOfElements,cavityDimensions,lidVelocity,viscosity,density,
viscosity = density*lidVelocity[0]/Re

# transient parameters: startTime,stopTime,timeIncrement,outputFrequency
transient = [0.0,60.000001,0.1,100000]
transient = [0.0,stopTime,timeIncrement,100000]
if RBS:
outputDirectory = "./output/Re" + str(Re) + "Elem" +str(elementResolution[0])+"x" +str(elementResolution[1]) + "_RBS/"
else:
Expand Down
12 changes: 6 additions & 6 deletions FluidMechanics/NavierStokes/LidDrivenCavity/nightlytest.json
Expand Up @@ -4,17 +4,17 @@
"test": [
{
"id": 1,
"args": "RBS",
"args": "RBS 1.0 50.0001",
"tolerance": 1e-6,
"outputPath": "output/Re2500Elem20x20_RBS",
"expectedPath": "output/Re2500Elem20x20_RBS/expected_results"
"outputPath": "output/Re1000Elem10x10_RBS",
"expectedPath": "output/Re1000Elem10x10_RBS/expected_results"
},
{
"id": 2,
"args": "GFEM",
"args": "GFEM 1.0 50.0001",
"tolerance": 1e-6,
"outputPath": "output/Re2500Elem20x20_GFEM",
"expectedPath": "output/Re2500Elem20x20_GFEM/expected_results"
"outputPath": "output/Re1000Elem10x10_GFEM",
"expectedPath": "output/Re1000Elem10x10_GFEM/expected_results"
}
]
}}

0 comments on commit 555452e

Please sign in to comment.