Example #1
0
class TestIsothermalWall(unittest.TestCase):
    def setUp(self):
        self.wall_temps = np.linspace(100, 900, 9)
        self.CFDSolver = ADFLOW(options=aeroOptions)

    def test_getWallTemp(self):
        temps = self.CFDSolver.getWallTemperature()
        np.testing.assert_array_almost_equal(self.wall_temps, temps, decimal=8)

    def test_setWallTemp(self):
        temps = np.linspace(1000, 9000, 9)
        self.CFDSolver.setWallTemperature(temps)

        #to insure won't be overwrited during __call__()
        self.CFDSolver.setAeroProblem(ap)

        np.testing.assert_array_almost_equal(
            self.CFDSolver.getWallTemperature(), temps, decimal=8)
Example #2
0
# dictionary with name of the zone as a key and a factor to multiply it with.
oversetpriority = {}

aeroOptions = {
    # Common Parameters
    'gridFile': args.gridfile,
    'outputDirectory': outputDirectory,
    'mgcycle': 'sg',
    'volumevariables': ['blank'],
    'surfacevariables': ['blank'],

    # Physics Parameters
    'equationType': 'rans',

    # Debugging parameters
    'debugzipper': False,
    'usezippermesh': False,
    'nrefine': 10,  # number of times to run IHC cycle
    'nearwalldist': 0.1,
    'oversetpriority': oversetpriority
}

# Create solver
CFDSolver = ADFLOW(options=aeroOptions, debug=False)

# Uncoment this if just want to check flooding
CFDSolver.setAeroProblem(ap)

name = '.'.join(args.gridfile.split('.')[0:-1])
CFDSolver.writeVolumeSolutionFile(name + '_IHC.cgns', writeGrid=True)
#rst end