Most Popular

1500 questions
8
votes
2 answers

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. The pressure outlet is the upper face of the box…
Elyse
  • 175
  • 4
8
votes
1 answer

Preconditioning and effects on precision of solution of LSE

In my courses on numerical analysis, I have been taught that the main and principal motivation for preconditioning linear systems of equations is to increase the convergence rate of iterative solvers for that LSE. But, is there any effect on the…
shuhalo
  • 3,660
  • 1
  • 20
  • 31
8
votes
2 answers

Stabilization of convection-dominated flow and turbulence modeling

Are stabilization techniques for convection-dominated flows like SUPG+PSPG, interior penalty methods, etc. able to handle turbulent flows without tubulence model being employed, at least up to some Reynolds numbers? Conversely is stabilization…
Jan Blechta
  • 927
  • 5
  • 13
8
votes
3 answers

Changing the queue for an already submitted PBS job

I have a job already submitted to a TORQUE queue. The system I submitted it on has several queues, and I want to change which queue I'm running it in. I found this question, which recommends the use of qalter, but qalter's man page doesn't have…
Dan
  • 3,355
  • 3
  • 21
  • 47
8
votes
2 answers

Astoundingly large difference when evaulating trigonometric identity with NumPy

According to Wolfram Alpha and the Sage computer algebra system, the following identity holds: $$ \cos\left(\arctan\left(\frac{l_1-l_2}{d}\right)\right) = \frac{1}{\sqrt{1 + \frac{(l_1-l_2)^2}{d^2}}} $$ However, when I tried to verify it with an…
Daniel Eberts
  • 293
  • 1
  • 5
8
votes
3 answers

Role of boundary conditions (e.g. periodic) in Poisson equation

Given 3D Poisson equation $$ \nabla^2 \phi(x, y, z) = f(x, y, z) $$ and the right hand side and the domain, am I free to impose any boundary conditions (BC) on the function $\phi$, or do they have to be somehow consistent with the right hand side?…
Ondřej Čertík
  • 2,930
  • 18
  • 40
8
votes
1 answer

Fitting one set of points to another by a rigid motion

I'm not really sure how to explain this problem clearly, so please bear with me. I have a basis of 3 orthonormal unit vectors and a position, a standard 4x4 transform matrix in computer graphics. Also I have several points (offsets) in that space…
DaleyPaley
  • 233
  • 2
  • 6
8
votes
2 answers

Kolmogorov–Smirnov test for multivariate data

I have a set of files consisting of randomly selected points from a dataset, each file belonging to a particular class. Each row in these files contains the coordinates in n-space of the point. I'd like to compare the distributions in n-space of…
bab
  • 181
  • 2
8
votes
1 answer

Bad scaling versus collinearity

I was trying to solve a linear system: $$ \mathbf{A}\mathbf{x} = \mathbf{y} $$ but the conditioning number was quite bad (around $10^{17}$). I thought that the system was singular, but after scaling the system using the diagonal…
Jugurtha
  • 707
  • 4
  • 12
8
votes
1 answer

Higher order Lax-Wendroff type scheme?

Suppose we want to solve a hyperbolic conservation law $u_t+f(u)_x=0$. I really like to use Lax-Wendroff, which reads $u_j^{n+1} = u_j^n -\frac{\Delta t}{\Delta x}(g(u_{j+1}^n,u_j^n)-g(u_j^n,u_{j-1}^n))$ where $g(v,w) = \frac12(f(v)+f(w)) -…
Anke
  • 368
  • 1
  • 7
8
votes
5 answers

Minimizing $\mathrm{trace}(S)+\mathrm{trace}(S^{-2})$ using CVX

In Matlab, I would like to minimize the function $$f(S)=\mathrm{trace}(S)+\mathrm{trace}(S^{-2})$$ where $S \in \mathcal{M}_{m,m}$ is symmetric and positive definite, which is definitely a convex function. I tried the following code: cvx_solver…
user2987
  • 193
  • 1
  • 6
8
votes
2 answers

Rearrange an ordinary matrix to block diagonal form

Is there an algorithm to rearrange a matrix into block diagonal form, given that the matrix is block diagonal in nature but randomized with an unwise choice of basis? In particular, are there any python modules for this?
Machine
  • 193
  • 1
  • 1
  • 6
8
votes
3 answers

Open boundary conditions with the advection-diffusion equation

Following on from my previous equation I'm would like to apply open boundary condition to the advection-diffusion equation (with reaction term), $$ \frac{\partial \phi}{\partial t} = \frac{\partial}{\partial x}\left( D\frac{\partial \phi}{\partial…
boyfarrell
  • 5,409
  • 3
  • 35
  • 67
8
votes
1 answer

What is the correct formulation of this "shopping bag" optimization problem, and how can I solve it efficiently?

I'm looking at finding a solution to the following problem, but I'm having trouble formulating it sensibly, and then finding an appropriate algorithm to solve it. Consider a list of items placed in a shopping bag: 1, 2, 3, 4... Each item can be part…
James Osborn
  • 181
  • 2
8
votes
1 answer

How to calculate the area of intersection between a 3D volume and a 2D plane

Hello if anyone can offer insight on how to solve my problem that would be great! I am looking to calculate the area of intersection between a 3D volume and a 2D plane. 3D volume: defined by 6 points (will always be a 3D wedge resembling a thick…
Chris
  • 81
  • 2