25 #define MAGENTA "\033[35m"
31 FluidDynamics::FluidDynamics() {
34 boost_invariant_ =
true;
35 SetId(
"FluidDynamics");
38 FluidDynamics::~FluidDynamics() {
46 JSINFO <<
"Initialize FluidDynamics : " << GetId() <<
" ...";
49 ini = JetScapeSignalManager::Instance()->GetInitialStatePointer().lock();
51 JSWARN <<
"No initialization module, "
52 <<
"try: auto trento = make_shared<TrentoInitial>(); "
53 <<
"jetscape->Add(trento);";
57 JetScapeSignalManager::Instance()->GetPreEquilibriumPointer().lock();
59 JSWARN <<
"No Pre-equilibrium module";
62 InitializeHydro(parameter_list);
65 JetScapeTask::InitTasks();
68 void FluidDynamics::Exec() {
69 VERBOSE(2) <<
"Run Hydro : " << GetId() <<
" ...";
70 VERBOSE(8) <<
"Current Event #" << GetCurrentEvent();
73 VERBOSE(3) <<
"length of entropy density vector="
74 << ini->GetEntropyDensityDistribution().size();
78 JetScapeTask::ExecuteTasks();
82 clear_up_evolution_data();
84 liquefier_ptr.lock()->Clear();
88 void FluidDynamics::CollectHeader(weak_ptr<JetScapeWriter> w) {
91 auto &header =
f->GetHeader();
92 header.SetEventPlaneAngle(GetEventPlaneAngle());
96 void FluidDynamics::FindAConstantTemperatureSurface(
97 Jetscape::real T_sw, std::vector<SurfaceCellInfo> &surface_cells) {
98 std::unique_ptr<SurfaceFinder> surface_finder_ptr(
101 surface_cells = surface_finder_ptr->get_surface_cells_vector();
102 JSINFO <<
"number of surface cells: " << surface_cells.size();
111 std::unique_ptr<FluidCellInfo> fluid_cell_ptr;
112 GetHydroInfo(time, x, y, z, fluid_cell_ptr);
113 real energy_density = fluid_cell_ptr->energy_density;
114 return (energy_density);
123 std::unique_ptr<FluidCellInfo> fluid_cell_ptr;
124 GetHydroInfo(time, x, y, z, fluid_cell_ptr);
125 real entropy_density = fluid_cell_ptr->entropy_density;
126 return (entropy_density);
134 std::unique_ptr<FluidCellInfo> fluid_cell_ptr;
135 GetHydroInfo(time, x, y, z, fluid_cell_ptr);
136 real temperature = fluid_cell_ptr->temperature;
137 return (temperature);
145 std::unique_ptr<FluidCellInfo> fluid_cell_ptr;
146 GetHydroInfo(time, x, y, z, fluid_cell_ptr);
147 real qgp_fraction = fluid_cell_ptr->qgp_fraction;
148 return (qgp_fraction);
153 std::array<Jetscape::real, 4> jmu)
const {
154 liquefier_ptr.lock()->get_source(tau, x, y, eta, jmu);
157 void FluidDynamics::PrintFluidCellInformation(
160 JSINFO <<
"=======================================================";
161 JSINFO <<
"print out cell information:";
162 JSINFO <<
"=======================================================";
168 JSINFO <<
"pressure = " << fluid_cell_info_ptr->
pressure <<
" GeV/fm^3.";
170 JSINFO <<
"mu_B = " << fluid_cell_info_ptr->
mu_B <<
" GeV.";
171 JSINFO <<
"mu_S = " << fluid_cell_info_ptr->
mu_S <<
" GeV.";
172 JSINFO <<
"mu_C = " << fluid_cell_info_ptr->
mu_C <<
" GeV.";
173 JSINFO <<
"vx = " << fluid_cell_info_ptr->
vx;
174 JSINFO <<
"vy = " << fluid_cell_info_ptr->
vy;
175 JSINFO <<
"vz = " << fluid_cell_info_ptr->
vz;
176 JSINFO <<
"shear viscous pi^{munu} (GeV/fm^3): ";
177 for (
int i = 0;
i < 4;
i++) {
178 for (
int j = 0;
j < 4;
j++) {
182 JSINFO <<
"bulk_Pi = " << fluid_cell_info_ptr->
bulk_Pi <<
" GeV/fm^3";
183 JSINFO <<
"=======================================================";
186 void FluidDynamics::UpdateEnergyDeposit(
int t,
double edop) {
188 JSDEBUG <<
MAGENTA <<
"Jet Signal received : " << t <<
" " << edop;