Questions tagged [fluid-dynamics]

The study of the properties of fluids and gases in motion

Filter by
Sorted by
Tagged with
0
votes
2answers
236 views

Boundary conditions for streamlines in enclosed flow

I am trying to solve Lid driven square cavity flow problem of Stokes equation using finite element method. I have boundary conditions for velocity as zeros on every boundary but u=1 on top boundary. ...
0
votes
1answer
113 views

Finite Element - Flux Calculation

I am solving an advection-diffusion equation using the FEM and am having trouble calculating my fluxes. I start with the equation, $$\frac{\partial n}{\partial t} = \frac{\partial j_{n}}{\partial x}\...
7
votes
1answer
527 views

Time discretization of the variational formulation of the Navier-Stokes equation

I've asked this question on mathoverflow too. Let $T>0$ $I:=(0,T]$ $d\in\mathbb N$ $\Lambda\subseteq\mathbb R^d$ be nonempty and open, $$\mathcal V:=\left\{\phi\in C_c^\infty(\Lambda,\mathbb R^d):...
2
votes
3answers
477 views

Finite volume piecewise linear 2D advection develops instability

I'm developing a finite volume solver for the simple twodimensional advection equation with constant velocities $u, v$ and constant mesh spaces $\Delta x$: $$ \frac{\partial \rho}{\partial t} + u \...
1
vote
0answers
30 views

Pseudospectral method for Rayleigh-Benard with constant temperature gradient

$$ \nabla\cdot \mathbf{u} = 0 \\ \frac{\partial \mathbf{u}}{\partial t}+\left(\mathbf{u}\cdot \nabla\right)\mathbf{u} = -\nabla p+\nu\nabla^2\mathbf{u}+\alpha g\theta\mathbf{e}_z\\ \frac{\partial\...
2
votes
0answers
37 views

Verification on pressure predictor method for CFD code

I have developed a python code for a lid-drive cavity model. However, my results are not converging. The algorithm of my code looks like this: Euler Momentum Equation looks like this: $$\frac{u^{n+1}...
1
vote
0answers
16 views

What is the exponential trick to include laplacian term in Rayleigh-Bernard simulation

I have come across a Rayleigh-Bernard simulation code which doesn't have the laplacian term but an integrating factor (in the exponential form) containing viscosity and diffusivity. I found out that ...
0
votes
0answers
30 views

Is semi-Lagrangian 1D advection identical to upwind Euler, when $|u|<\Delta x/\Delta t$?

This looked true to me, I worked through the algebra for 1D and confirmed it. But no one seems to mention it, so maybe I'm missing something... I'm using Bridson's SIGGRAPH 2007 course notes. [5MB ...
2
votes
0answers
52 views

Solving a simple Shallow Water model

Hi. I have a question at Mathematics and they suggested post here, once it's not common. I transcript as following. Many thanks I need to solve with basic methods this simple Shallow Water Model: $...
6
votes
0answers
115 views

What are some good debugging habits for numerical simulation?

I'm currently writing a lid drive cavity CFD code on python. Currently, my code has some issues (values jumping bear b.c). I was wondering what are some good habits in debugging numerical codes. ...
0
votes
0answers
8 views

Universal formulation of adiabatic equations of state in compresible finite-volume simultions

I code some finite element solver which should work for broad variety of materials (i.e. gas, liquid, solid, plasma) and large span of compressions resp. densities. I want to simulate things like ...
1
vote
1answer
59 views

What will be the impact of quantum computing on existing numerical techniques (e.g. CFD)?

Quantum computing seems to be a very active and promising development area in computer science. However, I am curious as to what impact (if any) quantum computing will have on existing classical ...
1
vote
0answers
44 views

WENO scheme on curvilinear coordinates

I've been developing a curvilinear FVM code. So far I've implemented the PPM scheme and am looking into adding WENO schemes. So far I've been discretizing the grid metrics using a second-order central....
0
votes
0answers
37 views

OpenFOAM and CFDEM on GPU

I have a simulation project written for OpenFOAM and CFDEM and would like to find an alternative to run it on GPU since raising the number of cores already provided a promising speed up and ...
3
votes
1answer
315 views

General case Kutta condition

I'm working on a 2D inviscid fluid simulation using a "panel method", with Potential being used to enforce the no-through boundary condition. I'm trying to incorporate the Kutta condition, which says ...
1
vote
1answer
255 views

1-D turbulent energy spectra in homogeneous direction (non-isotropic)

I am trying to compute the one-dimensional energy spectra for my channel-flow simulation. I have already written a post-processing script to achieve this; however, I need to validate my code before ...
1
vote
1answer
56 views

How to get started with numerically solving a Stochastic Navier Stokes equation

I originally posted the question on the math stackexchange, and was told I should try here. I’m researching Stochastic PDE, in particular the Navier Stokes Equation, and would like to estimate the ...
1
vote
0answers
27 views

turbulant flow modeling [closed]

I have been trying to model the flow in a very thin channel using COMSOL Multyphysics. The laminar flow module does not converge no matter how I change the meshes, or use ramping loads and such. The k-...
8
votes
3answers
611 views

Good introduction to numerical methods for magnetohydrodynamics (MHD)

I very recently started to read up about magnetohydrodynamics (MHD). While I have experience in the fluid part (both theory and numerics), my knowledge about the magneto part is very limited. At the ...
7
votes
3answers
1k views

Constructing random divergence-free velocity fields

I am trying to simulate decaying homogeneous isotropic turbulence. As initial condition I want a divergence-free vector-field, i.e, $\mathrm{div} U = 0$. How do I initialize random velocity field in ...
13
votes
4answers
325 views

How to create a random 3D domain representing a plant's root structure?

I would like to model laminar flow of water from roots to the stem of a plant. At the very end of the roots, the tubes vary from millimeter to centimeter scale in diameter and length. As we get closer ...
2
votes
1answer
588 views

Basic Finite Element Method (FEM) question: assembly and re-assembly

I'm reading up on the Finite Element Method (Zienkiewicz's Book), so I understand better what I'm doing in FEniCS and COMSOL. Currently, I'm wondering about this: Using FEM to solve fluid flow ...
8
votes
2answers
199 views

How many cells/elements do I need?

I'm relatively new in the CFD modelling and I'm making a VOF model of a rectangular box ($l \times w \times h = 120\times 80 \times8$ m) with an inlet ($w\times h = 10\times 8$) at the long side. ...
1
vote
1answer
144 views

Normalization of polynomials for discontinuous Galerkin methods (DGM)

I was curious if someone could share their opinion on this matter. I have noticed that some people in literature normalize their Legendre polynomials, i.e. divide or multiply the polynomial by $$\...
1
vote
0answers
204 views

Implementing pressure inlet boundary condition

I am interested in implementing pressure inlet boundary conditions for the 2D compressible Euler equations. My equation of state is an ideal gas ($p=\rho R T$) which is thermally prefect but not ...
7
votes
1answer
3k views

computing turbulent energy spectrum from isotropic turbulence flow field in a box

I have my 3 dimensional velocity flow-field u, v and w at a given instant of time from DNS using pseudo-spectral method. I need to calculate the energy spectrum ( in Fourier space ) as a function of ...
3
votes
1answer
113 views

Comparison between FEM and FDM methods for flow simulations

What are the main differences between finite element and finite difference approach for incompressible flow simulations? I have a vague idea about how FE methods rely on minimizing the residual over ...
2
votes
2answers
143 views

Automatic timestep adjustment in a CFD solver

I have developed my own 3D Finite Volume Navier-Stokes solver based on projection method for nonuniform grid. I am looking to incorporate automatic timestep adjustment at each time step based on ...
0
votes
0answers
10 views

Compute cell values and isosurface constant from density values of particles

I am trying to reconstruct the surface for a fluid simulation based on a list of particles using the Marching Cubes algorithm. From different resources, such as http://paulbourke.net/geometry/...
1
vote
0answers
31 views

Dealing with spurious oscillations in particle tracking methods

I work on modelling high intensity discharge xenon-filled lamps. The model governing the discharge is quite complex and sadly includes fluid dynamics. After some time, I managed to implement a finite-...
-1
votes
1answer
55 views

Simulating magnetic particles in a field free point generated by two opposing magnets

This is probably a long shot with such a short time, but I've been trying to get theoretical data for a project I'm working on. The project involves using a very simplified version of magnetic ...
0
votes
1answer
63 views

Is “Gradient Computation” in Finite Volume Discretization Really 2nd order accurate?

Based on this, pp 245, we go through these steps to discretize a gradient statement, namely $\nabla\phi$: 1- Gauss theorem reads, $$ \int_V\nabla \phi dV = \oint_{\partial V}\phi dS $$ 2- Integral ...
0
votes
1answer
166 views

Poincare map for Arnold-Beltrami-Childress Magnetic Field in Python

I want to plot the Poincare map for Arnold-Beltrami-Childress magnetic field for parameters $A=1, B=0.816, C=0.5773$ in Python for the Poincare section $z=0$. Also, I am not able to understand what ...
2
votes
1answer
3k views

PDEs in their weak form in Comsol

If a physical model is not listed in the wizard, we can use Comsol's weak form to enter PDE's (governing equations of a system) in their weak form. How can it be done ? for example: 2 equations of ...
1
vote
2answers
312 views

Can I model laminar incompressible fluid flow and heat transfer in MATLAB's PDE toolbox?

I have a system of PDEs in cylindrical coordinates that needs to be solved: 1. Continuity equation 2. Incompressible Navier stokes ( in r & z coordinates) 3. Heat transfer equation with both ...
0
votes
1answer
72 views

Imposition of Dirichlet BC for Fourier pseudospectral in this paper

I was trying to implement the algorithm from the paper "Adapting a Fourier pseudospectral method to Dirichlet boundary conditions for Rayleigh–Benard convection". I am having a hard time to ...
1
vote
1answer
466 views

Proper boundary conditions for potential flow around cylinder

I am computing the stationary, incompressible, inviscid and irrotational flow around a circular cylinder using a discretization in general coordinates. I derived a PDE and proper boundary conditions ...
0
votes
0answers
74 views

Double mach reflection at a inclined wedge

I am running into a strange problem when solving the 2D compressible Euler equations on a inclined wedge. To elaborate, my top boundary condition seems to emitting some type of instability. I have ...
0
votes
1answer
66 views

What's a time centered Riemann problem?

I am trying to understand the meshless methods as described in https://arxiv.org/pdf/1409.7395.pdf. I'm having trouble understanding the following step: (Page 7, just after equation 17) Now, rather ...
30
votes
4answers
2k views

Why is local conservation important when solving PDEs?

Engineers often insist on using locally conservative methods such as finite volume, conservative finite difference, or discontinuous Galerkin methods for solving PDEs. What can go wrong when using a ...
5
votes
1answer
451 views

Finite volume a posteriori error estimation

I'm wondering what alternatives there are to a grid convergence study to judge solution accuracy for a given grid resolution when doing steady-state RANS simulations on an automatically generated ...
17
votes
2answers
3k views

Discontinuous Galerkin: Nodal vs Modal advantages and disadvantages

There are two general approaches to representing solutions in the discontinuous galerkin method: nodal and modal. Modal: Solutions are represented by sums of modal coefficients multiplied by a set of ...
1
vote
0answers
25 views

Instability in Lattice Boltzmann Solver

I wrote a Lattice Boltzmann Solver in Rust a little while back using both the BGK approximation and the TRT (two relaxation time) method on the D2Q9 lattice. In both cases I run into major stability ...
0
votes
0answers
29 views

3D Tollmien-Schlichting Waves Imposed in a Channel Flow (Are Physics correct?, etc)

So I am trying to do some further tests on a 2nd-order code Incompressible Navier Stokes equations, by studying transition to turbulence in a Poiseuille flow. Specifically, I'm interested to see ...
1
vote
1answer
51 views

Anisotropic invariant expansion

I am trying to calculate the second and third invariants for a turbulent flow. I have the second order statistics (both transient and averaged). i.e $uu$, $vv$, $ww$, $uv$, $vw$ and $uw$. These are ...
6
votes
3answers
245 views

Why is the FVM traditionally used in CFD, and FEM in computational structures?

Most CFD codes use FVM. Most computational structures codes use FEM. Why is the FEM not frequently used in CFD, and why is FVM not frequently used in FEM?
3
votes
2answers
111 views

Finite volume discretization of non-conservative linear hyperbolic equation

Problem. Consider the one-dimensional adjoint Euler equations for $(x,t) \in \Omega \times [0,T]$ with $\Omega \subset \mathbb{R}$ and $T > 0$ $$ \varphi_t + \Big(\frac{\mathrm{d}F}{\mathrm{d} U}(x)...
9
votes
2answers
7k views

Use of machine learning in computational fluid dynamics

Background: I have only built one working numeric solution to 2d Navier-Stokes, for a course. It was a solution for lid-driven cavity flow. The course, however, discussed a number of schemas for ...
1
vote
1answer
115 views

Can OpenFoam be used for interactive simulations (flying a plane)?

I'm a software engineer and I've just started to fly rc-planes. I'm currently building a self learning auto-pilot for my plane and I'm really interested in CFD. I installed OpenFOAM and ran through ...
0
votes
1answer
160 views

Heat diffusion - Is this the correct approach to include Newmann boundary conditions?

Thank you for looking at this problem. Is this the correct approach to include neumann boundary conditions? With this solution temperature is not correct, and there´s no diffusion. The model seems ...