-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
Commando.PAX edited this page Feb 23, 2024
·
2 revisions
The initialization function is responsible for loading the related json file with the problem parameters.
This function generates a json file containing the problem parameters using user inputs. The json files obey the following formats (Sod Problem) :
{
"gamma": 1.4,
"L": 1.0,
"n_cell": 1000,
"C" : 0.9,
"rho_inf": 1.0,
"u_inf": 0.0,
"P_inf": 1.0,
"rho_sup": 0.125,
"u_sup": 0.0,
"P_sup": 0.1
}
Uses the state of the physical system at a time t to calculate the state at the time t + delta_t(U[:, 1], a_(U[:, 2], U[:, 0]),dx).
U = array([rho_i, u_i, P_i]) where i is the cell index, with this convention, U[:, 0] is every density, U[:, 1] every speed, U[:, 2] every pressure.
Returns : numpy.array
Computes the pressure using the polytropic equation of state with exponent gamma.
Returns : K * np.pow(rho,gamma)