Comments (4)
With the WINDOWS_GAPHICS
option you'll have to compile in Windows directly, for example with the MSVC compiler in Visual Studio Community. Compiling that in WSL will not work, as that's a linux environment.
The CONSOLE_GRAPHICS
option works in both Windows and Linux/WSL, provided your GPU appears as OpenCL device in WSL. Once the ASCII graphics window and pixel counter appears, the simulation is paused and by default grid flags are visualized. In the 3D Taylor-Green setup there is no solid geometry, so no flags are visualized and the window initially looks black. Press key 4 to enable Q-criterion isosurface visualization, or the other visualization modes with keys 2 or 3, then you should see something. Press P to start/pause the simulation. You can rotate the camera with W/A/S/D.
To disable interactive graphics and instead write rendered images to the hard drive, use GRTAPHICS
, and in src/setup.cpp
in the main_setup()
function you'll need to make a loop to alternatingly run a specified number of LBM time steps and write images. For example:
key_4 = true; // enable Q-criterion isosurface rendering by default
lbm.graphics.set_camera_centered(-60.0f, 20.0f, 0.0f, 2.5f); // set camera
lbm.run(0u); // initialize simulation
while(lbm.get_t()<18000u) {
lbm.graphics.write_frame_png(); // render frame and write it to hard drive in bin/export/
lbm.run(30u); // run 30 LBM time steps
}
from fluidx3d.
Thank you, I got it working with the GRAPHICS option, and I'll try getting the WINDOWS_GRAPHICS option to work, too. Pictures of the cylinder model look great, but the ones from the F1 car, Concorde or 747 model tend to fill up with isosurfaces completely, even when using varying values of the Q-criterion. Do you have a recommendation for that? By the way, is it possible to create cutting planes and legends?
And again, thanks for creating and publishing your solver, it could really be the kick in the ass for some bigger solver developers to modernize their codes! It's really great work :)
from fluidx3d.
What you see is the simulation blowing up at large Reynolds numbers. For these you need to enable SUBGRID in src/defines.hpp!
from fluidx3d.
Ah, that makes sense, thank you.
Another quick question: I compiled the benchmark files on my home PC to run them on a workstation, which works fine. However, using the same workflow to compile the exe (using MinGW bash environment to use ./make.sh) on the workstation, the solver does not run stating that no OpenCL devices are available. Since the files created on my personal PC worked without a problem on the workstation using either the GPU or CPU, this seems odd. Do you happen to know what the issue might be? The GPU drivers are installed, of course.
from fluidx3d.
Related Issues (20)
- Code fails in interactive mode sending "xcb_xlib_threads_sequence_lost". HOT 1
- Status file and Images not generated on a Linux Server HOT 5
- FR: Cubed Sphere Lattice HOT 4
- Calculation of liquid that does not fit in memory HOT 1
- neural network liquids HOT 1
- LBM has no member "graphics" HOT 1
- C2084 function 'int main(int,char* {})' already has a body............in file graphics. cpp HOT 4
- D3Q15 Dam Breaking Expanding Water HOT 3
- (Not an issue) - Porting to Perl and Python; first steps... making code a bit more standalone and general-purpose... HOT 1
- Wierdly behaving 3D objects / Meshes HOT 2
- Visualizing rho and u in Paraview HOT 3
- Less brittle Linux OpenCL setup instructions HOT 3
- No progress - stuck at Step 0 (benchmark works) HOT 2
- cannot find file "FluidX3D.exe" HOT 2
- Including the scale, frame-info, and copyright notice inside the output PNG files ? HOT 1
- INTERACTIVE_GRAPHICS_ASCII broken by the "Made camera movement/rotation/zoom behavior independent of framerate" feature? HOT 1
- Struct of Arrays vs Arrays of Structs: Possible Oversight? HOT 2
- Connection to flow5 possible?
- Order of pairs is non uniform between Lattice sets HOT 2
- Applying a force during simulation to simulate main line water pressure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluidx3d.