# All Questions

7,406 questions
2 views

### Randomized Submatrix of a Sparse Matrix

I have a sparse square matrix $A$ with size $n \times n$ and number of nonzero entries $nnz$. The goal is making a sub-matrix $B$ with $s$ nonzeros which are randomly chosen from $A$. Duplicates are ...
9 views

### Has there been a comparison bewteen SIMPLE/SIMPLER and JFNK for steady CFD?

I'm looking for a comparison between the Jacobian-Free Newton-Krylov (JFNK) method performance compared to the conventional CFD nonlinear solution methodologies like SIMPLE. Does anyone know if such ...
9 views

### Simple Scanner Mistake [on hold]

package com; import java.util.Scanner; class Good { public Good() { ...
19 views

### Cannot obtain numerical solution to integral in Matlab

I have been trying to get Matlab to solve the following integral for a while (just to be clear when I say "solve" I mean "spit out a number"): ...
29 views

92 views

### Integer operations vs floating point operations

I have been working with an algorithm, which uses additions of floating point vectors, (sparse matrix of floats)x(dense vector of floats) dot products I recently found out that I can get the same ...
59 views

58 views

### SciPy 3d plotting Integral of $\int x^y dx$ for $y$ in $[-4,4]$

Ideally, I would like to get the symbolic/algebraic integral of the function and plot the resulting surface in 3d. I am not sufficiently versed in SciPy to know if this is even really possible.
56 views

### Efects from the boundary in advection equation [duplicate]

I am implementing the advection equation $u_x+(1/c)u_t=0$ following a Crank-Nicholson finite difference scheme. The equation for this is \begin{eqnarray*} -\frac{\gamma}{4} w_{n-3 j+1} + w_{n-2 j+1} ...
24 views

### Logging vs outputs in iterative optimisation

I'm coding an iterative algorithm of constrained continuous optimisation. An augmented Lagrangian algorithm (outer) calls a bound-constrained L-BFGS-B algorithm (inner), which calls a line search ...
12 views

### DataSet merges with another DataSet in c# with MySql 5.7 [closed]

Howe to DataSet/DataTable merges with another DataSet/DataTable in c# with MySql 5.7.2.So other DataSet joins the ende of the first DataSet, not the top
140 views

### Derive the formula for eigenvalues

If $A$ has eigenvalue $\lambda_A$ $$B = I - c\frac{I-rA}{I-\bar{r}A}$$ How to derive the eigenvalue $\lambda_B$? $$\lambda_B=1-c\frac{1-r\lambda_A}{1-\bar{r}\lambda_A}$$ where $c, r, \bar{r}$ are ...
72 views

### How to solve an implicit ODE with forward Euler?

Consider the implicit ODE $$M(y)\dot{y} = F(t,y)$$ If $M$ is non-singular for all $y$ How to use the forward-Euler method to numerically solve for $y$ without inverting $M(y)$? I only came out ...
28 views

### What is the difference between Abaqus and Calculix contact input?

I would like to say first that am new at using Calculix. I'm using Abaqus/CAE to create a cup deep drawing simulation and everything worked perfectly but my objective is to run the same exact ...
46 views

### Nonlinear functional optimization in radial coordinates

I am currently implementing classical density functional theory for a radially symmetric system. In mathematical terms, I am searching for a function $f(r)$ that minimizes a functional $\Omega[f]$. ...
56 views

### Vieta’s exact solution for the three roots of the general cubic polynomial [closed]

I need help writing a code in Matlab to solve cubic equations using Vieta's... Very new to programming, so this is what I have so far: By means of a translation and rescaling, the general cubic can ...
52 views

### PML boundary conditions

I set up two one-way wave equations for constant velocity $c$ in one-dimension. When I implement them I get a highly unstable (divergent) solution. I wonder if someone could give me a suggestion about ...
16 views

### rhoCentralFoam shockTube - is there any thorough documentation?

I am new with OpenFOAM, and I will have to modify ShockTube tutorial of OpenFOAM rhoCentralFoam solver. Where can I find the information about this tutorial? Searching in Google has only led me to ...
63 views

### Penalization parameter for DG with jump penalization

I adapted this FEniCS code for my problem and I'm wondering if there is any good resource about how to choose the penalty parameter $\alpha$? Best case would be, if I can define it through some ...
26 views

### How to load several arrays from .txt and plot points with specifications?

I need to load data from a .txt file (<3KB) in Matlab. The structure of the data is as follows: s_0.4 2.00869311294470 1.90140098201689 4.00117387799144 2.73028990891229 ... ...
48 views

### Solid mechanics codes mostly use Dirichlet and traction BCs - why?

In a lot of the computational solid mechanics papers that I've come across, boundary conditions are typically implemented as a traction boundary condition or a Dirichlet boundary condition. But in ...
47 views

### Wrapped BVP with an unknown boundary for fluid modeling

I have a model about a fluid being extruded on a moving bed as in the 3D printing process. The model is a boundary-value problem where the right boundary is the point where the fluid attaches to the ...
129 views

69 views

### Taylor-Hood finite hexahedral elements, pressure diverging

I am developing a FEM fluid solver using the Taylor-Hood algorithm, i.e. quadratic interpolation for velocity, and linear for pressure. I have developed the code for 2-D quadrilaterals and triangles, ...
126 views

### What algorithm does (did?) Excel use for Bessel functions that is discontinuous at x=8?

Writing this comment reminded me of something I noticed years ago about evaluating Bessel functions of the first kind $J_n(x)$ in Excel. (BESSELJ) I don't use Excel now but at the time I'd checked ...
I need to solve the following equation:  \begin{pmatrix} \frac{\omega^2}{c^2}\varepsilon_x-\mu_z^{-1}k_y^2-\mu_y^{-1}k_z^2 & \mu_z^{-1}k_xk_y & \mu_y^{-1}k_xk_z\\ \mu_z^{-1}k_xk_y &\...