Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rodionstepanov opened this issue Nov 1, 2024 · 0 comments
Open

Comments

@rodionstepanov
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant