Viewing 7 posts - 1 through 7 (of 7 total)
• Author
Posts
• #7375
Jijo
Participant

Dear Developers,

I am currently simulating a non-isothermal flow in a 2D channel with a hot wall with temperature of 80C and the fluid is flowing initially with a temperature of 20C. The thing is that I notice at the start of the simulation, that fluid inlet will have a temperature less than 20 which is not possible. I defined the lattice of my simulation as the following:

Code snippet:

NSlattice.defineDynamics<NoDynamics>(superGeometry, 0);
NSlattice.defineDynamics<ForcedBulkDynamics>(superGeometry.getMaterialIndicator({1, 2 ,3}));
NSlattice.defineDynamics<BounceBack>(superGeometry, 4);

int Lx = converter.getLatticeLength( lx );
int Ly = converter.getLatticeLength( ly );

T p0 = 8. * converter.getLatticeViscosity() * converter.getCharLatticeVelocity()*Lx/( Ly*Ly );
AnalyticalLinear2D<T,T> rho( -p0/lx*invCs2<T,NSDESCRIPTOR>(), 0, p0*invCs2<T,NSDESCRIPTOR>()+1 );

const T maxVelocity = converter.getCharLatticeVelocity();
const T radius = 0.5* ly;
std::vector<T> axisPoint( 2,T() );
axisPoint = lx/2.;
axisPoint = ly/2.;
std::vector<T> axisDirection(2,T());
axisDirection = 1;
axisDirection = 0;

Poiseuille2D<T> u( axisPoint, axisDirection, maxVelocity, radius );

std::vector<T> zero(2, T());
AnalyticalConst2D<T, T> u0(zero);
AnalyticalConst2D<T, T> one(1.);
AnalyticalConst2D<T,T> T_cold(converter.getLatticeTemperature(Tcold));
AnalyticalConst2D<T,T> T_Hot(converter.getLatticeTemperature(Thot));
std::vector<T> velocity( 2,T( 0 ) );
//velocity = converter.getCharLatticeVelocity();
//AnalyticalConst2D<T, T> u(velocity);
//AnalyticalConst2D<T,T> rho(1);

// Initialize all values of distribution functions to their local equilibrium
NSlattice.defineRhoU(superGeometry, 0, rho, u0);
NSlattice.iniEquilibrium(superGeometry, 0, rho, u0);
NSlattice.defineRhoU( superGeometry, 1, rho, u );
NSlattice.iniEquilibrium( superGeometry, 1, rho, u );
NSlattice.defineRhoU( superGeometry, 2, rho, u );
NSlattice.iniEquilibrium( superGeometry, 2, rho, u );
NSlattice.defineRhoU( superGeometry, 3, rho, u0 );
NSlattice.iniEquilibrium( superGeometry, 3, rho, u0 );
NSlattice.defineRhoU( superGeometry, 4, rho, u0 );
NSlattice.iniEquilibrium( superGeometry, 4, rho, u0 );

////////////////////////////////////////////////////// End of the code:
Material 1 is the fluid, 3 is the inlet, 2 is the outlet and 4 is the heating walls
Kindly point out the cause of this problem.
Regards,
Anas

• This topic was modified 1 month, 4 weeks ago by Jijo.
#7377
Jijo
Participant

Dear community,

Quick note, I also notice that the velocity is decreasing gradually. I wonder why? Maybe this is the main cause. I used different BCs, reduced the time step and the grid length but the reducing effect is still there.

Sincerely,
Anas

#7378
mathias
Keymaster

Dear Anas,

which boundary conditions did you apply? There seems to be a problem..

Best
Mathias

#7381
Jijo
Participant

Dear Dr. Mathias,

I used the interpolated velocity and pressure for the inlet and outlet, respectively. For the walls, I used bounce back for the NSlattice and drichlet (constant T) for the ADlattice.

Sincerely,
Anas

#7387
mathias
Keymaster

Dear Anas,

please, have a look at our other examples on thermal flows. There might be a similar situation which you can copy paste from.

Best
Mathias

#7475
Jijo
Participant

Dear Dr. Mathias,

I appreciate your reply but I could not find any example on forced convection flow. So I have combined two examples together. My main problem is that the velocity profile weakens during the run. by that I mean it decreases. My analysis is a transient so it must stay consistent throughout the run. Any suggestions on that?

regards

#7476
mathias
Keymaster

Its not possible to answer it without knowing the details. E-mail me to set up a common project..

Viewing 7 posts - 1 through 7 (of 7 total)
• You must be logged in to reply to this topic.