L-Nafaryus
4c18dc1b33
New: openfoam as package Mod: logging Fix: checking environment New: virtual environment for python
20 lines
542 B
Python
20 lines
542 B
Python
from .application import application
|
|
|
|
import re
|
|
|
|
def potentialFoam(case: str = None):
|
|
application("potentialFoam", "-parallel", useMPI = True, case = case, stderr = True)
|
|
|
|
|
|
def simpleFoam(case: str = None):
|
|
_, returncode = application("simpleFoam", "-parallel", useMPI = True, case = case, stderr = True)
|
|
out = ""
|
|
|
|
with open("simpleFoam.log", "r") as io:
|
|
for line in io:
|
|
if re.search("solution converged", line):
|
|
out = "simpleFoam:\n\t{}".format(line.strip())
|
|
|
|
return returncode, out
|
|
|