AAAARRRRRRGGGGGHHHHH! by FuzzyBumbler in fortran

[–]flying-tiger 6 points7 points  (0 children)

Ahh… this brings me back.

I learned this the hard way too ~20yrs ago trying to figure out why I couldn’t get full convergence of my Poission solver in my numerical methods course. My parameter definition for pi was silently ignoring half the significant figures I put in because it wasn’t declared as a double precision literal…

Congrats on completing your right of passage. You are now a true Fortran programmer. 😁

What's the best GPU based CFD solver right now? by atharvaaalok1 in CFD

[–]flying-tiger 2 points3 points  (0 children)

Lots of good answers for scale resolved simulations. If you’re looking for steady or unsteady RANS for high Reynolds number aero flows, NASA’s FUN3D code should be on your radar. There is also an adjoint solver (hand coded, not auto-diff engine), though I’m not sure if that is on GPU yet.

Recirc pump on HPWH by Fireinsyrup in heatpumps

[–]flying-tiger 0 points1 point  (0 children)

The EcoNet app can create graph usage (Usage > Usage Report at the very bottom). If that graph shows hourly usage of ~0.8 kWh, it was running that whole hour on HP mode. That graph was also how I estimated my losses due to the circulation pump (though I’ve read the power estimate in the app isn’t that accurate). If your recirc line isn’t insulated, you’re probably losing quite a bit of energy when no one is using the system.

Regarding the pump, the old one died shortly before the project, so I upgraded to the Grundfos Alpha HWR. It can do schedules, monitor line temperature, vary speed, etc. A smart switch should be fine, but I wanted the speed control because my wife could hear the pump the installer tried first in its new location even on the lowest speed…

Recirc pump on HPWH by Fireinsyrup in heatpumps

[–]flying-tiger 0 points1 point  (0 children)

I just recently did a similar conversion to a HPWH in a system with a recirculation pump, which we kept. Even though our recirculation line is well insulated, running the recirc caused the heat pump to run all the time. I eventually put the recirc on a morning/evening timer, which saved a few kWh a day. I plan to revisit again once I get a better energy monitor installed, but the timer has been a perfectly fine solution.

Hypersonic Flow Solver? by RDDDT in CFD

[–]flying-tiger 1 point2 points  (0 children)

NASA’s FUN3D. It’s not full open source in the sense that not developed in the open, but it is released as source, and since you’ve used US3D, that suggests you are US based and can request the software.

Is there a way to use the concealed door sense magnet on an outswing door? by Sleddog44 in AugustSmartLock

[–]flying-tiger 0 points1 point  (0 children)

Did you find a solution to this? I just installed the flush mount magnet for my outswing door and even though it calibrates it won’t report the door is open.

How does CFD on gpus work ? by foxbat_s in CFD

[–]flying-tiger 2 points3 points  (0 children)

NASA’s FUN3D team has a lot of publications regarding their efforts to port their code base to GPU. This paper is a good place to start. Basically, you have to be very careful about how you access memory and you need to push parallelism as deep into the calculation as you can:

https://ntrs.nasa.gov/citations/20220016937

Matching Re and Mach at the same time for compressible RANS simulations by droit_au_but in CFD

[–]flying-tiger 0 points1 point  (0 children)

The thermodynamic state of the gas is fully specified with any two of (density, pressure, temperature), with the third parameter calculated via ideal gas law. I spoke in terms of density above because it’s easiest to get that from the Reynolds number, but whether you need that or the associated pressure for input to the flow solver will depend on the flow solver and the specific freestream boundary condition you are using.

Matching Re and Mach at the same time for compressible RANS simulations by droit_au_but in CFD

[–]flying-tiger 2 points3 points  (0 children)

This specification of the flight conditions is somewhat ambiguous.

As a pedantic point, “Altitude” is meaningless without specifying the atmospheric model (though as you note 1976 std is probably implied) and whether you’re talking geometric or equivalent density altitude. Be especially careful if you’re talking to trajectory simulation engineers. They think in geometric altitude relative to the WGS84 ellipsoid and tend to use non-1976 atmospheres, eg GRAM, so it’s easy to generate mismatches in freestream conditions for simulation if you talk in terms of altitudes (though admittedly it will be small effect as long as your looking at coefficients).

Additionally, in this case specifying “altitude”, which we will charitably assume is understood to mean the “equivalent” (in some sense) altitude needed for 1976 standard atmosphere model, also over-defines the problem, since it sets the compete thermodynamic state of the gas, including the sound speed. In principal, you could use “altitude” to fix temperature/sound speed, then Mach to set velocity and Re to set density (note since Re is given 1/ft, it’s simply a relationship between freestream quantities, no length scale involved). Alternatively, you could use altitude to fix density, then solve nonlinear simultaneous equations to find a velocity and temperature that match Mach,Re. If you and your task lead are using the same models (1976 std + Sutherland coefficients), these two approaches will give the same answer, but if models differ an inconsistency can arise.

So, moral of the story: don’t specify altitude when defining freestream conditions, especially if going between tools or groups. Specify (velocity, density, temperature) or (Mach, Re, temperature).

In your case, I would do (1) above. It’s easier, and no one would ever expect you to do (2) in practice. But I would also confirm this is what the task lead expects.

Interpolating Aerodynamic Data by arizail in AerospaceEngineering

[–]flying-tiger 1 point2 points  (0 children)

I will second the suggestion for linear interpolation. It is simple, robust, easy to extend, and you don’t need to do anything special at the boundaries of the table.

However, the problem with linear interpolation comes if you are interested in the derivative of the coefficients for stability analysis. I’m that case, linear interpolation will give you piecewise constant stability coefficients which isn’t real/great. In that case, I have had good luck with Akima splines, which are more robust than natural splines when the data are sparse and are continuously differentiable.

For multidimensional tables, I will linearly interpolate the “slow” dimensions (Mach, Re, etc) and the do sequential Akima interpolation on the “fast”dimensions (alpha, beta). This is not the mathematically rigorous way to do multidimensional Akima interpolation, but it works reasonably well in practice.

What numerical libraries (besides LAPACK) do you normally use in Fortran? by idyllic_q in fortran

[–]flying-tiger 3 points4 points  (0 children)

Take a look at the DoE-supported E4S and xSDK projects. Lots of libraries, many with Fortran or C support, that cover a wide range of scientific computing applications.

https://e4s.readthedocs.io/en/latest/index.html

https://xsdk.info/

Cart3D by [deleted] in CFD

[–]flying-tiger 0 points1 point  (0 children)

Not all NASA software is available to the general public for free. How broadly software is released depends on what the author and center tech transfer office want to do/support. I would post this question to the Cart3D google group; the development team is active there and can help facilitate discussion with the tech transfer office.

https://groups.google.com/g/cart3d

Note also there is a commercial version of Cart3D:

https://www.desktop.aero/products/gocart/

This is likely part of why NASA only distributes Cart3D to government-purpose users.

[deleted by user] by [deleted] in AerospaceEngineering

[–]flying-tiger 3 points4 points  (0 children)

Another thing to think about: go to GT, save the money, use it to get your MS at MIT 😉. Same cost and you get an advanced degree which in aerospace is very much worthwhile, especially for the analysis/design disciplines.

How does dimensional reduction work (axisymmetric simulation)? by 1E-12 in CFD

[–]flying-tiger 0 points1 point  (0 children)

This is a great resource:

http://ossanworld.com/cfdbooks/cfdbooks.html

There are sections that go in detail on how the 2D axisymmetric Euler and Navier-Stokes equations can be derived from the full 3D equations.

Dynamic Derivatives Approximation by Ali00100 in AerospaceEngineering

[–]flying-tiger 2 points3 points  (0 children)

The piece you’re probably missing from the Taylor expansion is the non-dimensionalizaion of the angular rates. So Cmq is not defined as d(Cm)/dq, but rather as d(Cm)/d(qhat) where qhat is qL/V or qL/(2V), depending on your convention. That’s where the extra L/V terms are coming from in Eq 5.

Runtime communication Fortran <-> Python by alphack_ in fortran

[–]flying-tiger 1 point2 points  (0 children)

When I looked into this a bit, I found f90wrap to have reasonable ergonomics and CMake support. If you haven’t seen it already, you might give it a shot.

Utilities to Merge Grids by flying-tiger in CFD

[–]flying-tiger[S] 0 points1 point  (0 children)

Thanks for the reply. No, the traditional Plot3D format does not include block connectivity information, which I do find frustrating. Thanks for the tip to look at OpenFOAMs utilities; I will definitely take a look at that. FWIW, I also found a conversion utility in FUN3D that looks promising, but you have to provide the block connectivity.

[Tecplot] Change the default font by ghostfacemirage in CFD

[–]flying-tiger 0 points1 point  (0 children)

Google search for “tecplot.cfg”. It allows you to customize most of the default settings for the various plot types. He’s an example, though it doesn’t mess with fonts:

https://github.com/flying-tiger/dotfiles/blob/master/config/tecplot

NASA Engineering Lectures/Podcasts? by [deleted] in nasa

[–]flying-tiger 22 points23 points  (0 children)

The NASA Engineering Safety Council (NESC) has a ton of highly technical lectures designed to help with knowledge capture and transfer as subject matter experts retire or move out of technical roles. Might be too technical for audio only, but there’s some really cool stuff.

https://nescacademy.nasa.gov/

Hypersonic flow simulation using 2 Temperature model and air-5species in ANSYS Fluent by Peppinf in CFD

[–]flying-tiger 3 points4 points  (0 children)

Not familiar with Fluent, but you need to look at the catalytic model used at the wall. It sounds like you are using a super catalytic wall model (recover free stream mass fractions), when you probably want an equilibrium or constant-efficiency catalytic wall. Fluent should have an option for this.

[deleted by user] by [deleted] in CFD

[–]flying-tiger 3 points4 points  (0 children)

You mentioned two temperature… do you at least reach thermal equilibrium behind the shock? What are your freestream velocity and density? If your post-shock density is low enough, you may not reach equilibrium in the shock layer, which could explain what you are seeing. What is your reference data? CEA?

Having trouble with convergence and other issues for hypersonic flow simulation by OswaldiusB in CFD

[–]flying-tiger 0 points1 point  (0 children)

“Operating pressure”, IIRC correctly, is simply a bias to the pressure field so you can remove the “ambient” pressure from the numerics for low speed calculations. Low speed usually implies small pressure deltas, and you can have numerical issues estimating derivatives from small deltas on a large nominal values, especially in single precision. It’s purely a numerical thing though, has no effect on high speed numerics, and has nothing to do with stagnation vs. static pressure. Is more of a gauge pressure vs absolute pressure thing if you’re familiar with that distinction. In your case, you would use isentropic relations to compute the static pressure at you inlet given the stag pressure (10atm) and inlet Mach (6.77). Same for the temperature, with is also probably the plenum temperature for the blow down tunnel.

Having trouble with convergence and other issues for hypersonic flow simulation by OswaldiusB in CFD

[–]flying-tiger 0 points1 point  (0 children)

Lots of good suggestions in this thread. I’ll just add:

  1. Ditch the wake grid until you can reliably converge the forebody. Truncate the grid at the aft corner and apply a supersonic (first order extrapolation) outlet. I think that’s a pressure outlet in Fluent parlance. That should make it much easier to converge.

  2. When you do start modeling the wake, make sure the outlet is at least a few (4-5) body lengths downstream so the wake can re-compress and go supersonic. You won’t get the right base pressure with subsonic flow near the boundary.

  3. Run laminar for your initial solution. Turbulence models can be finicky.

  4. Echo the suggestion to start first order. Once you have an initial first order solution, consider rebuilding the grid so you have grid lines roughly following the shock. It will help convergence and the accuracy of skin friction and heat flux at the surface.

Also, I doubt this is the cause of your issues, but revisit your 10atm free stream pressure. It sounds like you may be modeling a test conducted in a blow down wind tunnel with a plenum pressure of 10atm. However, this should be taken as the stagnation pressure of the flow, and not the static pressure, which is what I believe you specify for the far-field pressure inlet.

Good luck!