コード例 #1
0
def test_gen_dynmeshdict():
    os.chdir("test")
    u = 1
    r = 1
    meantsr = 1
    foampy.gen_dynmeshdict(u, r, meantsr, npoints=10, rpm_fluc=0)
    t, theta, omega = foampy.load_theta_omega()
    assert t.min() == 0
    assert t.max() == 0.5
    assert len(omega) == 10
    assert np.mean(omega*r/u) == meantsr
    os.chdir("../")
    os.system("git checkout test/constant/dynamicMeshDict")
コード例 #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script creates the dynamic mesh dictionary with periodic omega

omega fluctuates with 3 periods per rotation, and a phase shift to put
the first peak at 80 degrees, to match experiments

@author: pete
"""

import foampy

U = 1.0
R = 0.5
meantsr = 1.9

foampy.gen_dynmeshdict(U, R, meantsr, cellzone="AMISurface", npoints=400)
コード例 #3
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script creates the dynamic mesh dictionary with periodic omega

omega fluctuates with 3 periods per rotation, and a phase shift to put
the first peak at 80 degrees, to match experiments

@author: pete
"""

import foampy

U = 1.0
R = 0.5
meantsr = 1.9

foampy.gen_dynmeshdict(U, R, meantsr, cellzone="AMIsurface_z", npoints=500)
コード例 #4
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This script creates the dynamic mesh dictionary

@author: pete
"""

import foampy

U = 1.0
R = 0.13
meantsr = 3.5

foampy.gen_dynmeshdict(U, R, meantsr, npoints=0, axis="(1 0 0)", direction=-1)