Skip to content
Snippets Groups Projects
Commit 82cff13d authored by Klaus Böhnlein's avatar Klaus Böhnlein
Browse files

Add Option to receive Cell-Output

parent ee57ebf8
Branches
No related tags found
No related merge requests found
...@@ -63,18 +63,29 @@ def RunCellProblem(alpha,beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirn ...@@ -63,18 +63,29 @@ def RunCellProblem(alpha,beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirn
def GetCellOutput((alpha,beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirname(os.getcwd()) +"/inputs/computeMuGamma.parset",
OutputFilePath = os.path.dirname(os.getcwd()) + "/outputs/outputMuGamma.txt" ):
RunCellProblem(alpha,beta,theta,gamma,mu1,rho1, InputFilePath)
print('Read effective quantities...')
Q, B = ReadEffectiveQuantities()
print('Q:', Q)
print('B:', B)
return Q, B
# unabhängig von alpha... # unabhängig von alpha...
def GetMuGamma(beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirname(os.getcwd()) +"/inputs/computeMuGamma.parset"): def GetMuGamma(beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirname(os.getcwd()) +"/inputs/computeMuGamma.parset",
OutputFilePath = os.path.dirname(os.getcwd()) + "/outputs/outputMuGamma.txt" ):
# ------------------------------------ get mu_gamma ------------------------------ # ------------------------------------ get mu_gamma ------------------------------
# ---Scenario 1.1: extreme regimes # ---Scenario 1.1: extreme regimes
if gamma == '0': if gamma == '0':
print('extreme regime: gamma = 0') # print('extreme regime: gamma = 0')
mu_gamma = (1.0/6.0)*arithmeticMean(mu1, beta, theta) # = q2 mu_gamma = (1.0/6.0)*arithmeticMean(mu1, beta, theta) # = q2
print("mu_gamma:", mu_gamma) # print("mu_gamma:", mu_gamma)
elif gamma == 'infinity': elif gamma == 'infinity':
print('extreme regime: gamma = infinity') # print('extreme regime: gamma = infinity')
mu_gamma = (1.0/6.0)*harmonicMean(mu1, beta, theta) # = q1 mu_gamma = (1.0/6.0)*harmonicMean(mu1, beta, theta) # = q1
print("mu_gamma:", mu_gamma) # print("mu_gamma:", mu_gamma)
else: else:
# --- Scenario 1.2: compute mu_gamma with 'Compute_MuGamma' (much faster than running full Cell-Problem) # --- Scenario 1.2: compute mu_gamma with 'Compute_MuGamma' (much faster than running full Cell-Problem)
# print("Run computeMuGamma for Gamma = ", gamma) # print("Run computeMuGamma for Gamma = ", gamma)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment