Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com>
  • Loading branch information
oguevremont and AmishgaAlphonius authored Jul 16, 2024
1 parent f7c5794 commit a7f7b45
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
16 changes: 3 additions & 13 deletions applications_tests/lethe-fluid/tracer_flow_rate.prm
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
set dimension = 2

subsection simulation control
set method = steady
set output frequency = 0
end

subsection FEM
set velocity order = 1
set pressure order = 1
set tracer order = 1
end

subsection physical properties
set number of fluids = 1
subsection fluid 0
set kinematic viscosity = 0.01
set tracer diffusivity = 1
end
end

subsection multiphysics
set fluid dynamics = true
set tracer = true
set tracer = true
end

subsection mesh
Expand Down Expand Up @@ -70,9 +61,8 @@ subsection post-processing
set verbosity = verbose
set calculate tracer statistics = true
set tracer statistics name = tracer_statistics

set calculate tracer flow rate = true
set tracer flow rate name = tracer_flow_rate_test
set calculate tracer flow rate = true
set tracer flow rate name = tracer_flow_rate_test
end

subsection non-linear solver
Expand Down
4 changes: 2 additions & 2 deletions include/core/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ namespace Parameters
/// Enable flow rate post-processing
bool calculate_flow_rate;

/// Enable flow rate post-processing
/// Enable tracer flow rate post-processing
bool calculate_tracer_flow_rate;

/// Set initial time to start calculations for velocities
Expand All @@ -905,7 +905,7 @@ namespace Parameters
/// Prefix for flow rate output
std::string flow_rate_output_name;

/// Prefix for flow rate output
/// Prefix for tracer flow rate output
std::string tracer_flow_rate_output_name;

/// Prefix for the enstrophy output
Expand Down
2 changes: 1 addition & 1 deletion include/solvers/tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class Tracer : public AuxiliaryPhysics<dim, GlobalVectorType>
std::shared_ptr<SimulationControl> simulation_control;
DoFHandler<dim> dof_handler;

// Finite element spce
// Finite element space
std::shared_ptr<FiniteElement<dim>> fe;

// Mapping and Quadrature
Expand Down
6 changes: 3 additions & 3 deletions source/solvers/tracer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ Tracer<dim>::postprocess_tracer_flow_rate(const VectorType &current_solution_fd)
tracer_flow_rate_vector[i_bc] =
Utilities::MPI::sum(tracer_flow_rate_vector[i_bc], mpi_communicator);

// Filling table
// Fill table
this->tracer_flow_rate_table.add_value(
"time", this->simulation_control->get_current_time());
this->tracer_flow_rate_table.set_precision("time", 12);
Expand All @@ -707,11 +707,11 @@ Tracer<dim>::postprocess_tracer_flow_rate(const VectorType &current_solution_fd)
if (simulation_parameters.post_processing.verbosity ==
Parameters::Verbosity::verbose)
{
this->pcout << "Tracer flow rate at the boundaries : " << std::endl;
this->pcout << "Tracer flow rate at the boundaries: " << std::endl;
for (unsigned int i_bc = 0;
i_bc < this->simulation_parameters.boundary_conditions.size;
++i_bc)
this->pcout << "\t boundary " << i_bc << " : "
this->pcout << "\t boundary " << i_bc << ": "
<< tracer_flow_rate_vector[i_bc] << std::endl;
}

Expand Down

0 comments on commit a7f7b45

Please sign in to comment.