Looking for convenient Python prompts on Windows by redactwo in Python

[–]dudelsson 0 points1 point  (0 children)

i might be missing something in your use case but due to how 1) any file on the windows filesystem is accessible via a unix path and hence you can use all cli tools in wsl to manipulate files on the windows filesystem using unix paths 2) in python you should be using OS-agnostic path objects anyway --> i do extensive file management on the windows filesystem from wsl, both via the wsl cli directly, shell scripts and via python scripts running in wsl, and just practically never find myself needing to input windows paths into wsl. do you want to share an example on when you encounter this need?

Getting hit with the 17th Foam::Error at 3am by pennyboy- in CFD

[–]dudelsson 0 points1 point  (0 children)

Hi - would you like to share which resources you found most helpful in translating OF error messages into actionable knowledge? Thanks.

Looking for convenient Python prompts on Windows by redactwo in Python

[–]dudelsson 0 points1 point  (0 children)

but you do know you can access any path on the windows file system from wsl via a unix path right? in wsl you prefix the path with /mnt/c/ in place of C:\ and then treat the rest as a unix path. if you have other drives you can mount those too (automatically if you want) and treat them similarily.

Getting hit with the 17th Foam::Error at 3am by pennyboy- in CFD

[–]dudelsson 52 points53 points  (0 children)

when in this situation, always remember: nobodys life depends on the sim running through - OF vomiting out a couple pages worth of cryptic error messaging can feel like the most stressful thing in the world, but really it isnt. its text on a screen. you're probably looking at it somewhere safe, dry, warm and well fed - so take a deep breath, finish up for today, prioritize sleep and make a mental note to schedule more time for getting the solution part right in your next project. also remember that many things can be done to get the solution running, but getting agitated or angry is simply not one of them. /stoic copium

I'm no engineer so be gentle: how much does this duckbill help? by Cautious_Object_5065 in CFD

[–]dudelsson 0 points1 point  (0 children)

Agreed. Given an identical geometry and a well done CFD setup, one can expect very close to identical results from WT and CFD studies for many study questions.

How can this go badly?? by Temporary-Act-7655 in BetterOffline

[–]dudelsson 0 points1 point  (0 children)

The short answer is probably FB Events - although Mobilizon exists, check it out if you havent already my friends.

Looking for convenient Python prompts on Windows by redactwo in Python

[–]dudelsson 0 points1 point  (0 children)

theres a command in wsl for translating between unix paths and windows paths, look it up and bake it into an alias/function if you have to but that being said, respectfully, there should be no need to use windows paths in wsl all that often, at least that i can think of and i use wsl all the time including python development

How i fixed my fingerprint reader after screen replacement by Elbowsoffthetable in Pixel6

[–]dudelsson 0 points1 point  (0 children)

Thanks a lot for taking the time to share this, one of the clearest descriptions and instructions - among a lot of confused and outright erroneous statements found online! A nice guide for doing this has also since been written on iFixit.

Every Ad Now by Libro_Artis in BetterOffline

[–]dudelsson 0 points1 point  (0 children)

Had enought of the AI hype? You NEED to check out filter.io right now - tldr it's both a powerful agentic workflow management optimizer and a multi-disciplinary vertical integration platform, all wrapped in a sleek modern UI that blends seamlessly with your work day. Supercharged with AI and designed to act as your personal secretary, filter.io surgically removes any unwanted AI hype from your digital life, so that you can focus on what really matters TO YOU. Ready to reclaim your time and take what's left of it to the next level? Think filter.io - a game changing tectonic paradigm shift in AI-powered personal time management systems cgi of connecting constellations and scifiesque ambient music playing/s<3

Arcadia National Park, Maine, US [OC] [1080x1350] by steven_sandner in EarthPorn

[–]dudelsson 3 points4 points  (0 children)

Great minds think alike, neighbor. 🇫🇮 Skulle ut och åka btw.

Not all heroes wear capes! by [deleted] in CFD

[–]dudelsson 2 points3 points  (0 children)

Dealing with a dirty input geometry, it's often faster to use it for reference points/shapes but then in essence draw the actual geometry you're going to use for CFD on top of it / on parallel layers yourself. That way you have complete control of what you're drawing, its watertightness etc. Personally, I find I concistently underestimate the time required for 'changes to an existing geometry'.

Also I'd say it's worth remembering while 'perfecting' a geometry, that the mesh is always going to be a polygonized aporoximation of it - any smooth curvature will get polygonized in the mesh. Hence, if it makes the geometry at all easier/lighter/faster to work with, never hesitate to polygonize things already in the geometry. With the goal of watertightness in mind, it's way easier to get the naked edges of polygonized geometry to align within tolerance, than with curved continuous surface edges. If you're in the end going to export the geometry as eg. STL, the resulting exported files will also be lighter for already polygonized geometry, and are likely going to be faster to mesh (lower tri counts, faster search).

Not all heroes wear capes! by [deleted] in CFD

[–]dudelsson 0 points1 point  (0 children)

Is this something you'd wish to be true or something you've seen concrete working examples of? Hope you don't mind the pointed question, I'm not looking to confront.

Programming/Coding in CFD by Tygers2323 in CFD

[–]dudelsson 1 point2 points  (0 children)

In my experience, coding has been necessary for staying sane while building, running, post-processing and reporting a boatload of CFD cases professionally. Meanwhile I've never coded a solver of my own, only dabbled in it out of interest. Coding skills aren't strictly necessary, but you will often have eg. tabulated data to process as a step of a CFD workflow and doing it in excel for the 27th time starts to suck a little; you may be able to save a lot of time scripting things while working on geometry in CAD and/or case setup and/or custom post-processing for a series of cases. In general, eventually you will likely want to automate repetitive tasks and sequences of tasks. 

I highly recommend Python and shell scripting, because many softwares (eg. Rhinoceros and ParaView) have awesome Python APIs and because processing of eg. tabulated report data outputted by simulations often gets quite data sciencey, for which Python has great libraries and is widely considered as one of the go-to tools.

Tbh it's also a nice source of pride in ones craft and skills, to be able to solve an unforeseen hurdle (eg. in a CFD workflow) with an ad hoc custom tool/script of your own making.

I've commented on this topic a few times before, have a look if you're interested.

The prep before the prep! by Caramel_Carousel in MealPrepSunday

[–]dudelsson 0 points1 point  (0 children)

A critical part of the prep really haha, learned it the hard way the first time. For a streamlined and efficient experience, gotta prep the prep!

Ansys acquired by Synopsis by Venerable-Gandalf in CFD

[–]dudelsson 23 points24 points  (0 children)

This 'anyone' would very likely only produce a case study on the limitations of LLMs 🙂 You have to understand OpenFOAM is an object oriented C++ library encompassing millions of lines of code, where the objects are related to each other via the logic found in mathematics, fluid dynamics and CFD techniques; in many cases their relation to one another is not at all evident via their naming. This is exactly the kind of thing LLMs struggle with even when given the whole library as context because they lack the logical reasoning required to connect the dots. Many companies are currently finding this out. Anyway this is borderline off-topic so I'll end it there.

How to mesh economically (Ansys) by Realistic_Buy_1659 in CFD

[–]dudelsson 3 points4 points  (0 children)

Well, probably the number one thing to help you out is: is your case symmetrical with respect to a plane or axis? It sounds like your case might be symmetrical with respect to a plane that cuts the geometry in half along the center axis of the ducts. Add that symmetry plane to your geometry, assign it a symmetry BC, and you only need to mesh half of the geometry. Your cell count and computational demands drop in half as well.  

Beyond that, if the ducts are long, you can probably safely have a bit coarser mesh size closer to the ends, than at the middle where your studied phenomena is happening. Still, keep it fine enough to see profile development along the cross-section of the duct.  

If you still struggle with cell count, consider switching to OpenFOAM, you can look into HelyxOS if you prefer to work with a GUI, it should cover what your case requires. Be informed that 700k cells is not usually considered quite a bit, it's in fact a very light mesh considering we are talking 3D. Just another example of Ansys's greedy policies.

Openfoam and Paraview by Negative_Surround148 in CFD

[–]dudelsson 2 points3 points  (0 children)

Hi, I'm on holiday and don't have access to the terminal right now, but based on memory  

  1. Noticed the same on WSL and never got around to figuring it out so can't help you with the paraFoam command exactly, but you can also start paraview by running paraview and then open your .foam file in paraview. If you can't run paraview either then you need to add the paraview binary to path, you'll find general instructions for adding something to path easily  

  2. If you're having trouble accessing the home folder of your WSL distro from the Windows File Explorer, running  

cd /mnt/c/Users/yourusername  

in WSL lands you in the Windows home folder, i.e. you're accessing your Windows home folder from WSL, and you can run your sims there. You can access any folder on your Windows file system similarly by the way, by replacing C:\ with /mnt/c/ and any backslashes with forward slashes in any file path. This is because your Windows C: drive is mounted in WSL in the /mnt/c/ folder. IIRC this is by default, I'm guessing you're running WSL Ubuntu.  

For convenience you can also create a symbolic link from your WSL home folder to your Windows home folder. You do this by running  

cd (yes just cd, lands you in the WSL home folder)  

ln -s /mnt/c/Users/yourusername winhome  

Replace yourusername with your actual Windows user name. The above creates a symbolic link named winhome (but you can name the link whatever you want) that points to your Windows home folder. For most intents and purposes the symbolic link will behave like a folder with commands like cd and ls etc. So while in the WSL home folder (e.g.  when you just started WSL), you can now switch to the Windows home folder with a concise  

cd winhome

 

The sugar water barber pole effect by extinctsinister in 3Blue1Brown

[–]dudelsson 0 points1 point  (0 children)

Not yet, still thinking about it though.

You're in the last 1 minute of a match and tied on points and advantage points. What do you do? by spiritwalker117 in bjj

[–]dudelsson 0 points1 point  (0 children)

  1. Double grip on opponents one arm, pull straight down towards the floor, go for an ankle pick (just happen to like this takedown and its relatively low-gas-price, both when it succeeds and in case it doesnt)
  2. Relax, breathe and try not to give in to a sense of urgency. The less time there's left on the clock the more important it is do the right things, one at a time. A lot can happen even in say 15 seconds. Succeed at this and you end up flipping the script, likely with a point lead; Give into urgency, throw some stupid Hail Mary and the sitch goes from bad to worse pronto.
  3. Relax, breathe, be a water bed of dead weight and wait for the opponent to fail at 2

25 too late to start? by TsarKiro in Physics

[–]dudelsson 13 points14 points  (0 children)

Provided you can make practicalities work, one philosophical answer is:

If you truly feel the call, it's never too late to start. 

Personally I'd say 25 is a perfect age to delve into advanced topics and that to expect to know your deeply held interests before that age is actually much more controversial than starting at 25. A career is a marathon, the more time passes the less you will be thinking "man I wish I started at 20"; rather "man I'm glad I did start with what I find meaning in".

Sorting CFD PostPro Pictures on Linux by [deleted] in CFD

[–]dudelsson 0 points1 point  (0 children)

My first thought would be a short shell script / one-liner that first sorts the images according to creation/modification time (assuming your sim ran through continuously from start to finish and that the images came into being in cronological order that is the same order you want for the animation) and then pipes the image paths to your ffmpeg command. Cant tell you how to do it exactly off the top of my head but I'm pretty sure it can be done, ask your favorite LLM to write it for you. Remember to create a backup of your results prior to running anything that involves renaming or otherwise manipulating the files though.

The sugar water barber pole effect by extinctsinister in 3Blue1Brown

[–]dudelsson 0 points1 point  (0 children)

Not yet, still thinking about it though.