Beispiel #1
0
def main():
    model = Problem().model(
        model="2d",
        dx=1.0e-1,
        dt=1.0e-3,
        t0=0.0,
        u0=0.1,
        order=5,
        num_nodes=400,
        num_iters=5000,
        pumping=GaussianRingPumping2D(power=20.0, radius=10.0, variation=3.14),
        original_params={
            "R": 0.0242057488654,
            "gamma": 0.0242057488654,
            "g": 0.00162178517398,
            "tilde_g": 0.0169440242057,
            "gamma_R": 0.242057488654,
        },
        dimless_params={},
    )

    # Obtain steady state solution
    solution = model.solve()
    solution.report()
    solution.visualize()
    solution.show()
Beispiel #2
0
def solve_problem(desc):
    desc = loads(desc.encode('utf8'))

    model = Problem().model(model='2d',
                            dx=2.0e-1,
                            dt=2.0e-3,
                            t0=0.0,
                            u0=0.1,
                            order=5,
                            num_nodes=200,
                            num_iters=2000,
                            pumping=GaussianPumping2D(power=desc['power'],
                                                      variation=5.0),
                            original_params={
                                'R': 0.0242057488654,
                                'gamma': 0.0242057488654,
                                'g': 0.00162178517398,
                                'tilde_g': 0.0169440242057,
                                'gamma_R': 0.242057488654,
                            },
                            dimless_params={})

    solution = model.solve()
    solution.report()
    solution.store()

    return True
Beispiel #3
0
def solve_problem(desc):
    desc = loads(desc.encode('utf8'))

    model = Problem().model(
        model = '2d',
        dx = 2.0e-1,
        dt = 2.0e-3,
        t0 = 0.0,
        u0 = 0.1,
        order = 5,
        num_nodes = 200,
        num_iters = 2000,
        pumping = GaussianPumping2D(power=desc['power'], variation=5.0),
        original_params = {
            'R': 0.0242057488654,
            'gamma': 0.0242057488654,
            'g': 0.00162178517398,
            'tilde_g': 0.0169440242057,
            'gamma_R': 0.242057488654,
        },
        dimless_params = {
        })

    solution = model.solve()
    solution.report()
    solution.store()

    return True
Beispiel #4
0
def main():
    model = Problem().model(model='1d',
                            dx=1.0e-1,
                            dt=1.0e-3,
                            t0=0.0,
                            u0=0.1,
                            order=5,
                            num_nodes=400,
                            num_iters=10000,
                            pumping=GaussianRingPumping1D(power=20.0,
                                                          radius=10.0,
                                                          variation=3.14),
                            original_params={
                                'R': 0.0242057488654,
                                'gamma': 0.0242057488654,
                                'g': 0.00162178517398,
                                'tilde_g': 0.0169440242057,
                                'gamma_R': 0.242057488654,
                            },
                            dimless_params={})

    # Obtain steady state solution
    solution = model.solve()
    solution.report()
    solution.visualize()
    solution.show()