Skip to content

Artificial temperature diffusion at the solid boundary (TYPE_S) #241

Open
@rodionstepanov

Description

@rodionstepanov

I took a setup for the thermal convection in 2D and set betta=0. So no buoyancy force.
Linear temperature distribution between hot and cold boundaries is expected.
But I've found something very different (see attached figure). What is wrong in my code?

void main_setup() { //D2Q9, FP16S,  VOLUME_FORCE, TEMPERATURE
	LBM lbm(1000u, 1000u, 1u, 1u, 1u, 1u, 0.1f, 0.0f, -0.0005f, 0.0f, 0.0f, 0.1f, 0.0f);
	const uint Nx = lbm.get_Nx(), Ny = lbm.get_Ny(), Nz = lbm.get_Nz(); parallel_for(lbm.get_N(), [&](ulong n) { uint x = 0u, y = 0u, z = 0u; lbm.coordinates(n, x, y, z);
	lbm.rho[n] = units.rho_hydrostatic(0.0005f, (float)y, 0.5f * (float)Ny); // initialize density with hydrostatic pressure
	if (x == 1u) {
		lbm.T[n] = 1.75f;
		lbm.flags[n] = TYPE_T;
	}
	else if (x == Nx - 2u) {
		lbm.T[n] = 0.25f;
		lbm.flags[n] = TYPE_T;
	}
	if (x == 0u || x == Nx - 1u || y == 0u || y == Ny - 1u) lbm.flags[n] = TYPE_S; // all non periodic
		}); 
	lbm.graphics.visualization_modes = VIS_FLAG_LATTICE | VIS_FIELD;
	lbm.graphics.slice_mode = 3;
	lbm.graphics.set_camera_centered(-90.0f, 90.0f, 100.0f, 0.778801f);
	lbm.run();
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions