All,
I have a problem where there is a non-constant coefficient (background temperature) on the right hand side. This is an old problem that we've solved a number of times, but I can't recall or find the solution. Here the RHS NCC appears in an EOS for entropy (s):
T0 = z0 - z_basis.grid
conv_problem.add_equation(("Cv_inv*s - T_1/T_0 + (gamma-1)*ln_rho_1 = "
"-T_1*T_1/T_0/(T_0 + T_1)"))
conv_problem.parameters['T_0'] = T0
See the "T_0" term in two spots of the denominator of the RHS.
This works fine on a single processor, but breaks for parallel jobs, as now the T_0 on the RHS needs to be a locally defined quantity. It would seem like one solution to this is to define:
T0 = z0 - z_basis.grid
z_local = domain.grid(1)
T0_local = z0-z_local
conv_problem.add_equation(("Cv_inv*s - T_1/T_0 + (gamma-1)*ln_rho_1 = "
"-T_1*T_1/T_0_local/(T_0_local + T_1)"))
conv_problem.parameters['T_0'] = T0
conv_problem.parameters['T_0_local'] = T0_local
but T0_local is not globally sized, so the parser throws an error when running a parallel job.