Files
LBPM/analysis/FlowAdaptor.h

89 lines
2.6 KiB
C
Raw Normal View History

2021-09-04 11:25:39 -04:00
/* Flow adaptor class for multiphase flow methods */
#ifndef ScaLBL_FlowAdaptor_INC
#define ScaLBL_FlowAdaptor_INC
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <iostream>
#include <exception>
#include <stdexcept>
#include <fstream>
#include "models/ColorModel.h"
2021-09-18 12:16:42 -04:00
/**
* \class FlowAdaptor
* @brief
* The FlowAdaptor class operates on a lattice Boltzmann model to alter the flow conditions
*
*/
class FlowAdaptor {
2021-09-04 11:25:39 -04:00
public:
2021-09-18 12:16:42 -04:00
/**
* \brief Create a flow adaptor to operate on the LB model
* @param M ScaLBL_ColorModel
*/
FlowAdaptor(ScaLBL_ColorModel &M);
2021-09-18 12:16:42 -04:00
/**
* \brief Destructor
*/
~FlowAdaptor();
2021-09-18 12:16:42 -04:00
/**
* \brief Fast-forward interface motion
* \details Accelerate the movement of interfaces based on the time derivative
* Optional keys to control behavior can be specified in the input database:
* move_interface_cutoff -- identifies the diffuse interface region
* move_interface_factor -- determines how much to ``fast forward"
* @param M ScaLBL_ColorModel
*/
double MoveInterface(ScaLBL_ColorModel &M);
2021-09-18 12:16:42 -04:00
/**
2021-09-18 16:32:32 -04:00
* \brief Image re-initialization
* \details Re-initialize LB simulation from image data
2021-09-18 12:16:42 -04:00
* @param M ScaLBL_ColorModel
* @param Filename name of input file to be used to read image
*/
double ImageInit(ScaLBL_ColorModel &M, std::string Filename);
2021-09-18 16:32:32 -04:00
/**
* \details Update volume fraction based on morphological algorithm. Dilation / erosion algorithm will be applied to
* grow / shrink the phase regions
* @param M ScaLBL_ColorModel
* @param delta_volume target change in volume fraction
*/
double ShellAggregation(ScaLBL_ColorModel &M, const double delta_volume);
2021-09-18 16:32:32 -04:00
/**
* \details Update fractional flow condition. Mass will be preferentially added or removed from
* phase regions based on where flow is occurring
* @param M ScaLBL_ColorModel
*/
double UpdateFractionalFlow(ScaLBL_ColorModel &M);
2021-09-18 16:32:32 -04:00
/**
* \brief image re-initialization
* \details Re-initialize LB simulation from image data
* @param M ScaLBL_ColorModel
* @param seed_water_in_oil controls amount of mass to randomly seed into fluids
*/
double SeedPhaseField(ScaLBL_ColorModel &M, const double seed_water_in_oil);
2021-09-18 16:32:32 -04:00
/**
* \brief Re-initialize LB simulation
* @param M ScaLBL_ColorModel
*/
void Flatten(ScaLBL_ColorModel &M);
DoubleArray phi;
DoubleArray phi_t;
2021-09-04 11:25:39 -04:00
private:
int Nx, Ny, Nz;
int timestep;
int timestep_previous;
2021-09-04 11:25:39 -04:00
};
#endif