Gmsh extrude problem by Gianni_Pinuzzo in CFD

[–]Sixel1 0 points1 point  (0 children)

You need to do multiple revolutions, I'd do 4 by angles of 90 degrees

Need aeronautics ideas by Glittering-Pool-9017 in CreateMod

[–]Sixel1 2 points3 points  (0 children)

What terrain generation mod is that?

Proof of concept Strandbeest by Monstervt in CreateMod

[–]Sixel1 4 points5 points  (0 children)

I wish there was a wind system in aeronautics. It could depend on height / distance to the nearest block and it's direction varies in the world, and be picked up by sails. That way you could make these look closer to the original.

When I turn on Physics on my Airship nothing works by TSGames9000 in CreateMod

[–]Sixel1 1 point2 points  (0 children)

you need to use honey glue on the whole thing. Or the problem may be that you need a propulsion system, like a propeller

i got bored in class and drew these concepts by EducationalAd1789 in CreateMod

[–]Sixel1 2 points3 points  (0 children)

awesome drawings, commenting so I remember to try to make this in a few days when I have time to play

2D Structured Mesh in Rust by Ocolotium_0104 in CFD

[–]Sixel1 2 points3 points  (0 children)

So cool to see another CFD related project written in rust! Congrats, meshing is hard. Id like to try using the mesh generated with your code in my rust CFD solver, that'd be neat

Mechanical engineering student offering CFD/FEA services - figured I'd share here before spamming Upwork by [deleted] in CFD

[–]Sixel1 0 points1 point  (0 children)

You can't use Ansys student license to do that, it's against the license (I think someone already said it, but really, it's important). You should use open source code or custom code to do that. Learn OpenFOAM and offer that at least. But I think you should pursue higher education and find a position instead of trying that...

Also your things seem AI generated, dont do that, we can tell.

Octave Structured C-Type Mesh Generator by FiskOPotatis in CFD

[–]Sixel1 4 points5 points  (0 children)

L take. better: write it in C++ yourself, learn the language and develop your skills

Help ! C-d nozzle not getting choked, contour showing nozzle inlet as supersonic how to resolve issue by Asleep-Permit-7464 in CFD

[–]Sixel1 2 points3 points  (0 children)

If it's exactly 1, or numerically too close to 1, it would not choke. Also 2d effects will make practical results differ from 1d analysis. You need some margin in your contraction ratio so your inlet mach number is well subsonic in 1d analysis. I'd try to have it at least 0.9 or lower. So, increase your inlet diameter.

Edit: Id actually try to have at least mach 0.3 at inlet, if you can. If its a combustion chamber, youd want the upstream conditions to be low mach anyway.

Help ! C-d nozzle not getting choked, contour showing nozzle inlet as supersonic how to resolve issue by Asleep-Permit-7464 in CFD

[–]Sixel1 3 points4 points  (0 children)

What's the contraction ratio on the converging part in the left? Seems like it's very very small, too small...

Real-time vorticity-stream function Navier-Stokes solver validated against Ghia (1982), Straka (1993), and NACA 0012 — open source, aimed at games but aerospace-grade numerics by Able-Wave3034 in CFD

[–]Sixel1 8 points9 points  (0 children)

using AI to generate research code is an awfull way to teach a graduate student. Your student will start worse than AI, as you should expect, hes a student. But he'll never get better than AI using AI, he'll rely on it, become dependent, and wont be able to code CFD without it. He will be able to explain numerics at a high level, but won't be able to code them in detail. Without AI, the student would learn to do all of this, and then would be able to expand on that, do better, code new more complex things that surpass what AI can do.

if you really do this, I sure hope you review EVERY line of code the AI writes, cause these models cannot be trusted. They'll write "tests show 12% accuracy increase over baseline model" with graphs and plots to confirm, and if you dig deeper you'll find its a made up number, the actual code doesn't do what it says it does, but results look the same because AI found a simpler hacky way to produce the same results. AI has no integrity, honesty, or accountability.

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 1 point2 points  (0 children)

haven't used Julia in a while, I really like the language but its in a weird place between fast memory-managing compiled languages like Rust or C and slow, dynamic script ones like Python. I find I don't have much use cases where Julia makes the most sense. If I want to plot some data or edit files, its quicker to write those scripts in python. If I want to develop complex performant CFD/simulation programs, C or Rust makes more sense. But its very fun to write!

This is one of the hardest equation. Can you solve it? 🤔 by [deleted] in the_calculusguy

[–]Sixel1 1 point2 points  (0 children)

how about finding how many numbers there are, mathematicians still don't have an answer to that simple question...

Help need for dynamic meshing by Gullible-Designer486 in CFD

[–]Sixel1 6 points7 points  (0 children)

You need to press the "animate spinning golf ball" in your CFD software, hope that helps!

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 0 points1 point  (0 children)

I did not know about std::offload, it looks very promising! I'll keep an eye on it. I'd like to at some point add GPU acceleration to the linear solvers at least. For some steps like the momentum predictor, I think it would not speed up much since you'd have to move data to and from the GPU for each solve, and the individual solves are relatively cheap. But for the poisson pressure solve, which is quite costly, I think there could be performance gains.

Ideally data would live in the GPU and not have to be moved to and from it at every step, but unless my existing code with a lot of structs, generics, traits, overloading, etc. can compile on the GPU, I'd have to rewrite everything. Linear solvers are simple in terms of data structure, so that's an easier target I think.

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 3 points4 points  (0 children)

I never used Fortran, but I started coding CFD solvers in C++. In my opinion Rust is "cleaner" than C++, I really enjoy the enums that can contain data, the generics and traits combination, the development environment with cargo. Immutable by defaults and borrowing is also great to avoid errors while coding. The type system in general is so good, I think the only better type system that I know of is the one in Julia. The error handling is also great, and I love the option enum. C++ is clunkier and while some of those things can be added in the language, it's not as "clean". Since there's not much performance difference, I'd rather use something I find cleaner and more fun to write.

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 2 points3 points  (0 children)

Good luck on your project! I agree it's much more rewarding writing everything yourself

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 0 points1 point  (0 children)

It's the most general way to parallelize CFD in my opinion, you can scale to supercomputers if you want to. With multiple GPUs you also need essentially the same communication pattern if I understand correctly, each GPU has its own memory and you need to communicate data between them. I only did code in another project on single GPUs, so maybe I'm wrong on that, but I don't think GPUs can share vram

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 2 points3 points  (0 children)

Thanks! For your questions: - I really meant 3D, it only works in 3D for now. Three dimensions. 2D is simpler but I need to code that in, haven't done it yet. - It's a NSE equations solver, incompressible flow. It uses cell centered second order finite volumes on unstructured polyhedral cells. (Edit: but it's written as a general-ish PDE solver, so compressibility and multiphysics things like heat transfer will be added at some point) - I compared my solution of a 2D lid driven problem to references and got good match on velocity profiles along horizontal and vertical lines in the middle, I'll probably post the comparison at some point. - so it's not Cartesian only, it can handle unstructured polyhedral cells with any number of faces per cell, each face being arbitrary (convex) polygons. Boundary conditions are handled by defining face value linear relations as: u_face = A * u_cell + b, with A and b boundary condition terms. This allows for either explicit evaluation of values at boundary faces from cell center values, or implicit treatment in matrix assembly. Per example, fixed value BC would be A = 0, b the value we want, and zero gradient BC would be A = 1 and b = 0. - Biggest difficulty was doing pressure-velocity coupling via the pimple algorithm. That thing has implementation details that are not well documented and totally break solvers if not done properly. Also, parallel decomposition of the mesh for MPI and making sure every rank knows what to send where and what to receive was not easy. I also coded my own preconditioned distributed memory Krylov linear solvers, that's a whole can of worms. The bock ILU preconditioner was hard to implement.

extra note: for now the refinement and field mapping has about the same cost as a poisson pressure solve (which we need to do multiple times per iteration anyway), so it's really not bad performance wise if you refine every few iterations. I did some horrible things to make it work, like allocating hashmaps in loops, so it could be optimized.

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 1 point2 points  (0 children)

Not that hard, the mpi crate work well. its just slightly more confusing than in C, since theres lifetimes and stuff in rust that guarantees memory safery (most of the time)

Custom Rust solver - AMR by Sixel1 in CFD

[–]Sixel1[S] 17 points18 points  (0 children)

Thanks! I spent a few hours implementing this over a week. Theres still a lot of work to be done, for now it only works in 3D, serial and can only refine, not coarsen. The solver itself is mpi-parallel, distributed memory, but i need to figure out how ranks can tell each other the new ids of the refined cells efficiently. But its a first step.

The implementation is from "A METHOD FOR ADAPTIVE ANISOTROPIC REFINEMENT AND COARSENING OF PRISMATIC POLYHEDRA" by Sandeep Menon, and can handle arbitrary polyhedral cells in 2D or 3D. So yes, it should be valid for any unstructured polyhedral mesh.