TURTLE
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
NSVE< rnumber > Class Template Reference

Navier-Stokes solver. More...

#include <NSVE.hpp>

Inheritance diagram for NSVE< rnumber >:
Inheritance graph
[legend]
Collaboration diagram for NSVE< rnumber >:
Collaboration graph
[legend]

Public Member Functions

 NSVE (const MPI_Comm COMMUNICATOR, const std::string &simulation_name)
 
 ~NSVE () noexcept(false)
 
int initialize (void)
 Initialize DNS.
 
int step (void)
 
int finalize (void)
 
virtual int read_parameters (void)
 
int write_checkpoint (void)
 
int do_stats (void)
 Compute standard statistics for velocity and vorticity fields.
 
- Public Member Functions inherited from direct_numerical_simulation
 direct_numerical_simulation (const MPI_Comm COMMUNICATOR, const std::string &simulation_name)
 
virtual ~direct_numerical_simulation () noexcept(false)
 
int main_loop (void)
 
int read_iteration (void)
 
int write_iteration (void)
 
int grow_file_datasets (void)
 
int update_checkpoint (void)
 Basic computation of current checkpoint.
 
const std::string get_current_fname ()
 
- Public Member Functions inherited from code_base
 code_base (const MPI_Comm COMMUNICATOR, const std::string &simulation_name)
 
virtual ~code_base () noexcept(false)
 
int check_stopping_condition (void)
 
int start_simple_timer (void)
 
int print_simple_timer (const std::string operation_name)
 
MPI_Comm get_communicator () const
 
int get_nx () const
 
int get_ny () const
 
int get_nz () const
 

Data Fields

double dt
 
double famplitude
 
double friction_coefficient
 
double variation_strength
 
double variation_time_scale
 
double fk0
 
double fk1
 
double energy
 
double injection_rate
 
int fmode
 
int field_random_seed
 
std::string forcing_type
 
int histogram_bins
 
double max_velocity_estimate
 
double max_vorticity_estimate
 
double nu
 
std::string fftw_plan_rigor
 
vorticity_equation< rnumber, FFTW > * fs
 
field< rnumber, FFTW, THREE > * tmp_vec_field
 
field< rnumber, FFTW, ONE > * tmp_scal_field
 
- Data Fields inherited from direct_numerical_simulation
std::string name
 
int checkpoint
 
int checkpoints_per_file
 
int niter_out
 
int niter_stat
 
int niter_todo
 
hid_t stat_file
 
- Data Fields inherited from code_base
int myrank
 
int nprocs
 
MPI_Comm comm
 
std::string simname
 
int iteration
 
bool stop_code_now
 
int nx
 
int ny
 
int nz
 
int dealias_type
 
double dkx
 
double dky
 
double dkz
 

Detailed Description

template<typename rnumber>
class NSVE< rnumber >

Navier-Stokes solver.

Solves the vorticity equation for a Navier-Stokes fluid.

Allocates 1 vorticity equation and 1 vector field.

Constructor & Destructor Documentation

◆ NSVE()

template<typename rnumber >
NSVE< rnumber >::NSVE ( const MPI_Comm COMMUNICATOR,
const std::string & simulation_name )
inline

◆ ~NSVE()

template<typename rnumber >
NSVE< rnumber >::~NSVE ( )
inline

Member Function Documentation

◆ do_stats()

template<typename rnumber >
int NSVE< rnumber >::do_stats ( void )
virtual

Compute standard statistics for velocity and vorticity fields.

IMPORTANT: at the end of this subroutine, this->fs->cvelocity contains the Fourier space representation of the velocity field, and this->tmp_vec_field contains the real space representation of the velocity field. This behavior is relied upon in the NSVEparticles class, so please don't break it.

Implements direct_numerical_simulation.

Reimplemented in NSVE_Stokes_particles< rnumber >, NSVEcomplex_particles< rnumber >, NSVEp_extra_sampling< rnumber >, and NSVEparticles< rnumber >.

◆ finalize()

template<typename rnumber >
int NSVE< rnumber >::finalize ( void )
virtual

◆ initialize()

template<typename rnumber >
int NSVE< rnumber >::initialize ( void )
virtual

◆ read_parameters()

template<typename rnumber >
int NSVE< rnumber >::read_parameters ( void )
virtual

Reads parameters

Warning
This method should ensure the parameter file is closed by all MPI processes when finished. One solution is to open the file in sequential mode, read-only, and then call MPI_Barrier.

Reimplemented from direct_numerical_simulation.

Reimplemented in NSVE_Stokes_particles< rnumber >, NSVEcomplex_particles< rnumber >, NSVEp_extra_sampling< rnumber >, and NSVEparticles< rnumber >.

◆ step()

template<typename rnumber >
int NSVE< rnumber >::step ( void )
virtual

◆ write_checkpoint()

template<typename rnumber >
int NSVE< rnumber >::write_checkpoint ( void )
virtual

Field Documentation

◆ dt

template<typename rnumber >
double NSVE< rnumber >::dt

◆ energy

template<typename rnumber >
double NSVE< rnumber >::energy

◆ famplitude

template<typename rnumber >
double NSVE< rnumber >::famplitude

◆ fftw_plan_rigor

template<typename rnumber >
std::string NSVE< rnumber >::fftw_plan_rigor

◆ field_random_seed

template<typename rnumber >
int NSVE< rnumber >::field_random_seed

◆ fk0

template<typename rnumber >
double NSVE< rnumber >::fk0

◆ fk1

template<typename rnumber >
double NSVE< rnumber >::fk1

◆ fmode

template<typename rnumber >
int NSVE< rnumber >::fmode

◆ forcing_type

template<typename rnumber >
std::string NSVE< rnumber >::forcing_type

◆ friction_coefficient

template<typename rnumber >
double NSVE< rnumber >::friction_coefficient

◆ fs

template<typename rnumber >
vorticity_equation<rnumber, FFTW>* NSVE< rnumber >::fs

◆ histogram_bins

template<typename rnumber >
int NSVE< rnumber >::histogram_bins

◆ injection_rate

template<typename rnumber >
double NSVE< rnumber >::injection_rate

◆ max_velocity_estimate

template<typename rnumber >
double NSVE< rnumber >::max_velocity_estimate

◆ max_vorticity_estimate

template<typename rnumber >
double NSVE< rnumber >::max_vorticity_estimate

◆ nu

template<typename rnumber >
double NSVE< rnumber >::nu

◆ tmp_scal_field

template<typename rnumber >
field<rnumber, FFTW, ONE>* NSVE< rnumber >::tmp_scal_field

◆ tmp_vec_field

template<typename rnumber >
field<rnumber, FFTW, THREE>* NSVE< rnumber >::tmp_vec_field

◆ variation_strength

template<typename rnumber >
double NSVE< rnumber >::variation_strength

◆ variation_time_scale

template<typename rnumber >
double NSVE< rnumber >::variation_time_scale

The documentation for this class was generated from the following files: