#include <analyticalSol.h>
Public Member Functions | |
analyticalSol () | |
void | solve (vector< real > &p, const vector< real > &rP, const vector< real > &thetaP, const vector< real > &phiP, vector< real > &omegaX, const vector< real > &rOmegaX, const vector< real > &thetaOmegaX, const vector< real > &phiOmegaX, vector< real > &omegaY, const vector< real > &rOmegaY, const vector< real > &thetaOmegaY, const vector< real > &phiOmegaY, vector< real > &omegaZ, const vector< real > &rOmegaZ, const vector< real > &thetaOmegaZ, const vector< real > &phiOmegaZ, vector< real > &u, const vector< real > &rU, const vector< real > &thetaU, const vector< real > &phiU, vector< real > &v, const vector< real > &rV, const vector< real > &thetaV, const vector< real > &phiV, vector< real > &w, const vector< real > &rW, const vector< real > &thetaW, const vector< real > &phiW, int nTruncate, real ReynoldsNumber, vector< real > &solvedABCoeffOneParticle, vector< real > &UFixedParticles, vector< real > &SFixedParticles, vector< real > &VFixedParticles, int &fixedParticles, int rotatingParticles, int particle, real **angVel, real **angVelAcc, real **torqueOld, real **torqueNew) |
~analyticalSol () |
This class receives the finite-difference solutions of pressure and vorticity, solves the analytical solutions of velocity in the cage points, and returns these analytical solutions as the boundary conditions of the finite-difference scheme of the flow field.
analyticalSol::analyticalSol | ( | ) |
constructor
analyticalSol::~analyticalSol | ( | ) |
destructor
void analyticalSol::solve | ( | vector< real > & | p, | |
const vector< real > & | rP, | |||
const vector< real > & | thetaP, | |||
const vector< real > & | phiP, | |||
vector< real > & | omegaX, | |||
const vector< real > & | rOmegaX, | |||
const vector< real > & | thetaOmegaX, | |||
const vector< real > & | phiOmegaX, | |||
vector< real > & | omegaY, | |||
const vector< real > & | rOmegaY, | |||
const vector< real > & | thetaOmegaY, | |||
const vector< real > & | phiOmegaY, | |||
vector< real > & | omegaZ, | |||
const vector< real > & | rOmegaZ, | |||
const vector< real > & | thetaOmegaZ, | |||
const vector< real > & | phiOmegaZ, | |||
vector< real > & | u, | |||
const vector< real > & | rU, | |||
const vector< real > & | thetaU, | |||
const vector< real > & | phiU, | |||
vector< real > & | v, | |||
const vector< real > & | rV, | |||
const vector< real > & | thetaV, | |||
const vector< real > & | phiV, | |||
vector< real > & | w, | |||
const vector< real > & | rW, | |||
const vector< real > & | thetaW, | |||
const vector< real > & | phiW, | |||
int | nTruncate, | |||
real | ReynoldsNumber, | |||
vector< real > & | solvedABCoeffOneParticle, | |||
vector< real > & | UFixedParticles, | |||
vector< real > & | SFixedParticles, | |||
vector< real > & | VFixedParticles, | |||
int & | fixedParticles, | |||
int | rotatingParticles, | |||
int | particle, | |||
real ** | angVel, | |||
real ** | angVelAcc, | |||
real ** | torqueOld, | |||
real ** | torqueNew | |||
) |
Receives finite-difference solutions, obtains the analytical velocity for the Stokes equation, and returns these analytical solution to the finite-difference scheme
construct analytical solution in one cage for pressure, vorticity, velocities at those cage points
write everything in the form, using pressure as an example, p = pWeight dotproduct ABCoeff where pWeight = [pWeightA0, pWeightB0, pWeightA1, pWeightATilde1,pWeightB1, pWeightBTilde1, pWeightAK, pWeightATildeK,pWeightBK, pWeightBTildeK] and ABCoeff = [A0, B0, A1, ATilde1,B1, BTilde1, AK, ATildeK,BK, BTildeK] where B0 denotes p0 * Re^2
similarly, vorticity = omegaWeight dotproduct ABCoeff, uR = uRWeight dotproduct ABCoeff , uTheta = uThetaWeight dotproduct ABCoeff, u = uWeight dotproduct ABCoeff, v = vWeight dotproduct ABCoeff,
ABCoeff is to be determined from weightMatrix ABCoeff = b
note that r is the normalized distance from the origin
Formula are in spherical coordinate: p, u, v, w, omegaX, omegaY, and omegaZ.
all input and output fields of pressure, velocity, and vorticity are from the finite-difference scheme i.e., in the original inertial frame
p | pressure |
rP | r value of pressure points |
thetaP | theta value of pressure points |
phiP | phi value of pressure points |
omegaX | omegaX |
rOmegaX | r value of omegaX points |
thetaOmegaX | theta value of omegaX points |
phiOmegaX | phi value of omegaX points |
omegaY | omegaY |
rOmegaY | r value of omegaY points |
thetaOmegaY | theta value of omegaY points |
phiOmegaY | phi value of omegaY points |
omegaZ | omegaZ |
rOmegaZ | r value of omegaZ points |
thetaOmegaZ | theta value of omegaZ points |
phiOmegaZ | phi value of omegaZ points |
u | u |
rU | r value of u points |
thetaU | theta value of u points |
phiU | phi value of u points |
v | v |
rV | r value of v points |
thetaV | theta value of v points |
phiV | phi value of v points |
w | w |
rW | r value of w points |
thetaW | theta value of w points |
phiW | phi value of w points |
nTruncate | Order of the truncated spertral solutions |
ReynoldsNumber | Reynolds number |
solvedABCoeffOneParticle | Coefficiences of A, B, and C |
UFixedParticles | stores U of the LLS solver |
SFixedParticles | stores S of the LLS solver |
VFixedParticles | stores V of the LLS solver |
fixedParticles | stores if the particles are fixed |
rotatingParticles | stores if the particles are rotating |
particle | m-th particles |
angVel | angular velocity of particles |
angVelAcc | angular velocity acceleration of particles |
torqueOld | torque value in previous iteration of particles |
torqueNew | torque value in current iteration of particles |