instruction stringlengths 43 28.1k |
|---|
I was wondering about the last paragraph in Matrix Computations (4th edition) by Golub, Chapter 11 (11.3.3), specifically his explanation of subspace strategy for Conjugate Gradient.
Note that in Algorithm 11.3.1, the step-k optimization is over the affine space $x_k + span\{\nabla\phi(x_k)\}$.
Given that $Ax_0 \appro... |
I'd like to know whether the Hagen-Poiseuille equation can be used to solve for the velocity of fluid when the Reynolds number (Re) is less than 1.
From textbooks, I understand that the Hagen-Poiseuille equation can be used for laminar flows. However, I am not sure if it can be used when Re <1.
I'd like to ask for clar... |
Given a volume (say, some polyhedron), I need to fill it with smaller polyhedra, such that the space is filled as much as possible. The constraints and relaxations are:
(0) For a computation perspective, the number of small polyhedra is low, perhaps 8-10.
(1) The smaller polyhedra are not of the same size, and conform ... |
I have a nonlinear solver for equation
$$g= c_1f(x_1,y_1)+c_2f(x_2,y_2)$$
Note that $c_1$ is much bigger than $c_2$. After using Levenberg–Marquardt algorithm, it seemed to only optimize $x_1$ and $y_1$, while $c_2f(x_2,y_2)$ is ignored by the solver.
Is there a proper noun for this phenomenon?
|
A similar question was asked here and the given answer is perfect for a unidimensional integration.
I need to make bidimensional integration in R with a Gauss-Hermite quadrature:
$$\int_{R^2} h(p1,p2) \phi(p1,p2) dp1 dp2$$
with $p1$ and $p2$ two parameters that follow a multivariate normal distribution of density $\phi... |
I need to evaluate a sum of values that are on many different orders of magnitude in scale but might be signed. I’ve had great luck with the “log-sum-exp” trick for an unsigned version of my problem, so I’m hoping to apply this to the signed values.
Suppose $z,z’\in\mathbb C$ are stored using separate real and imagina... |
I would like to optimise the heat transfer on a PCB. Several dies are on the top and cooling air is going through the fins in heat sink on the bottom. The assembly consists of several layers like shown in the simplified figure below.
I would like to investigate the influence of for instance several thermal greases on ... |
I am looking for packing spheres (can be monodisperse or polydisperse with known radii distribtuions) inside a geometry. I am sure this is a well explored scientific problem with applications in different fields. This being the case, is there anyone who knows a library/code which can achieve this?
Note: The packing nee... |
I am developing a practical work of the following system of ode
\begin{align}x'(t) &= k_1h(t) - (k_2+k_3)x(t)\\
y'(t) &= k_3x(t)\end{align}
and $z(t) = (1-k_4)(x(t)+y(t))+k_4h(t)$, where $h(t) = 2t+1$
We now consider the following cost function:
$$J(u) = \frac{1}{2}\int_{t_0}^{t_f}|z_u(t)-\bar{z}(t)|^2w(t)dt+\frac{\lam... |
I'm doing an experiment on synthetic data and I want to generate enough data but not too much. So I wonder if there is any rule for the minimum number of projection angles and detector count.
For example, in 2D parallel beam case, if the image size is [H, H], I usually set the detector count as int(1.4*H) to cover the ... |
For my current work, I need to remesh a given geometry with Gmsh (currently trying all Gmsh versions to achieve this) to continue my Abaqus simulations.
As can be seen in the image, the geometry has got some sets or physical tags of types line and surface.
Physical Surface 1 denotes the surface set. Physical Curve 2 d... |
$$
y=\cases{-\sqrt{|x|}, \quad x\le0\\\sqrt{x}, \quad x>0}
$$
I've tried graphing this in python, but can't seem to figure it out. Does anyone know how to do this by chance?
|
I am currently working on a project where I need to use Fourier spectral methods to solve the KS equation. I found this code which is using the Fourier spectral methods to solve the classic 1D heat equation. Here's the code:
"""
Solving Heat Equation using pseudo-spectral and Forward Euler
u_t= \alpha*u_xx
BC= u(0)=0,... |
I have a 3D set of data v(i,j,k), and I want to compute the mean 2D slice vmean(i,j) summing up the nz slices of the v(i,j,k) set along its third dimension.
I wrote down this piece of FORTRAN90 code but it does not produce the correct results. Anyone can suggest me the solution?
Thanks in advance
gbl_sum = 0.0
do j ... |
In linear conjugate gradient method, our goal is to solve the system of linear equations $$Ax = b$$ where A is a symmetric positive definite matrix, and that is equivalent to finding the minimizer of the convex quadratic form : $$φ(x) = \frac12 x^T A x - x^T b$$
In the non linear CG method, our goal is finding the mini... |
After some parallel computations, I need to write the results in a file and for plotting reasons, I want them in ASCII format. Because of performance issues, I want to avoid to MPI_SEND the data to the master process and make him print. Thus, I am wondering if there is a way to write directly in ASCII with MPI.
Fortran... |
I need to understand what is the right expression for the "discrete $H^1$-norm of a function v(which of course need to be in $H^1$).
By definition, $$||v||_{H^1}^2 = ||\nabla v||_{2}^2 + ||v||_2^2 $$
so far I'm still in the continuous case. In practice if I need to compute it I have to do the discrete $L^2$ norm of the... |
I'm trying to implement a finite-difference fluid solver (incompressible, inviscous) using the QUICK scheme for advection. Mostly I've been following the Norris thesis chapter 2 (https://ses.library.usyd.edu.au/handle/2123/376) for the math.
It got advection of scalar fields to be stable and non-oscillating by using Ad... |
In section 3.2 of this paper [1], where 2D planar frame structures are being analyzed, the authors mentioned a transformation matrix to be used in extracting the element displacement vector from the displacement vector of the ground structure in global coordinates.
$u_i^e = (u_x^{(1)},u_y^{(1)}, \theta^{(1)},u_x^{(2)},... |
I have two matrix A and B, I want to find pattern B in matrix A. So I get 2 pattern similar like pattern B. What the name of this operation? and How I write this in mathematics notation?
Thank you in advance
|
I am wondering what is the fastest way to compute the zeroes of the trigonometric polynomial
$$
T(x) = \sum_{i=1}^La_i\sin\big(2\pi(a_i x) - \phi_i \big), \\
a_i \in \mathbb{N}, \\
\phi_i \in \left[-\pi,\pi\right[, \\
x \in \left[-\frac{1}{2},+\frac{1}{2}\right[.
$$
|
I have a system of coupled differential equations, one of which is second-order. I am looking for a way to solve them in Python. I would be extremely grateful for any advice on how can I do that!
$k$ is just a constant
$$
\left(\frac{dr}{dT}\right)^2=k-\left(1-\frac{5}{r}\right)\left(3+\frac{2}{r^2}\right)\\
\frac{d\v... |
I have a function $f:x\mapsto \vec{y}$ with $x \in [0,1]$ and $\vec{y}=(y_1,...,y_n) \in \mathbb{R}^n$. $n$ is a small integer e.g. $n=8$. Each of the component functions in $y_i(x)$ "oscilate" up and down (roughly between -1.5 and 1.5). A snippet of two such component functions looks like this,
I know that $f$ is inv... |
I have a 3D surface in $x$, $y$, and $z$. where $z$ is a function of $x$ and $y$ and my points are on a structured grid in $x$ and $y$. My function $z$ is highly oscillatory and irregular with multiscale phenomena. I'd like a fitting tool that will capture the large scale phenomena and provide a differentiable closed f... |
I'm trying to create my own 3d shape descriptor, the idea is that how I may evaluate how much my descriptor is well and good?
What I checked is that they evaluate descriptors through shape matching, shape retrieval, etc..
But my case now is before applying my descriptor to an application, though, Descriptor could be w... |
I have two almost identical FORM (by NIKHEF) scripts here:
script_1
script_2
which differ only in summation at the end. In first case the summation in done in one step, in the second case summation it is done in two steps.
When I subtract the results of the two previous scripts I get a non-zero result
http://147.213.1... |
I had a question regarding the implementation of the TVB limiter for the RKDG method by Cockburn. I have seen that some implementations of the DG method use normalized Legendre polynomials such that the basis functions take the form
$$
\phi_{i}^{k}(x) = \sqrt{2k + 1}P^{k}(x).
$$
With this formulation, we have
$$
u_{h}... |
I want to code this problem in MATLAB. It would be a huge help if someone can suggest to me how I can approach it.
I need to solve the below-highlighted equation, I need dT/drho. For that, I need to solve for dRp/drho. I do have a dependence on rho but I don't have it explicitly. I have grid points, where I know the v... |
In pre-smoothing we eliminate high frequencies,but what about post-smoothing?Is it used for the remain high frequencies that pre-smoothing didn't eliminate?
|
I have the following coupled equations for the conservation of mass and momentum of a compressible fluid :
\begin{equation}
\rho_t + (\rho u)_z = 0,
\end{equation}
$$
(\rho u)_t + (\rho u^2)_z + \tfrac{1}{k}\rho_z = \left(\frac{dp}{dz}\right)_f + \rho g
$$
over the domain $[0, 2L]\times[0, \infty)$ for density and velo... |
If we use an aggresive coarsening how does this affect the convergence of a MG cycle?Is the convergence slower?Do we need more cycles in this case?
|
I'm trying to create a model that will give me the best parts that lead to a maximized score out of a sequence.
my data(spark rdd) looks like this:
("dan", "john", "john", "guy", 45)
("john", "dan", "guy", 60)
("guy", "guy", "guy", "guy", "guy", "guy", "guy", "guy" 8)
("guy", "john", "john", "guy", "mark", 0)
the numb... |
Suppose the convex polytope is the set of feasible solutions $\mathbf{x}\in\mathbb{R}^n$ for the linear system $\mathbf{A}\mathbf{x}=\mathbf{b}\,,\; \mathbf{A}\in\mathbb{R}^{m\times n}$ subject to some (linear) constraints $\mathbf{0}\leq\mathbf{x}\leq\mathbf{v}$; how is it possible to select an interior point of said ... |
I have two different mesh files (both are .inp files obtained from Abaqus) that represent the exact same geometries with the same boundary conditions, etc. The only difference is that one of them is meshed in a structured fashion and the other one is meshed in an unstructured way.
Now here is my question, how do I find... |
For a linear least squares problem, it is possible to define a resolution matrix, relating the estimated model parameters to the true model parameters. If we are solving a regularized problem,
$$
\min_x || y - A x ||^2 + x^T \Lambda x
$$
then
$$
x_{est} = (A^TA + \Lambda)^{-1} A^T y
$$
and if we assume that $y = A x_{t... |
For the Krylov subspace method to solve the large sparse linear system, we first need to generate a subspace Km = span{v,Av,...A^{m-1}v}, which indeed a process that we convert a linearly independent basis to an orthonormal basis:
$$
V_mAV_m = H_m,
$$
where $H_m$ is a upper Hessenberg matrix, which has about $m^2/2$ no... |
I'm numerically solving a linear coupled ODE of the form
$$y^{\prime}(t) = \hat{M}(t)y(t)=\left[\begin{array}{cc}0& A(t)\\ B(t)& 0\end{array}\right]y(t),$$
and the difficulty I'm running into is that $A(t)$ and $B(t)$ don't change for long periods of time and suddenly change rapidly. Here is a plot of one example I'm ... |
I need to solve the following system of partial differential equations
\begin{align}
\psi_{x} &= -i a \psi - b \phi,\quad &(1)\\
\phi_{x} &= b \psi + i a \phi,\quad &(2)\\
\psi_{t} &= - ic \psi + d \phi, \quad &(3)\\
\phi_{t} &= - d \psi + i c \phi, \quad &(4)
\end{align}
where $\psi=\psi(x,t),\; \phi=\phi(x,t)$ and ... |
I need to visualize the response of a function
$$y=f(x_1, x_2, … , x_d)$$
with d in the order of 10-12 (the function f was sampled using finite element simulations). For lower-dimensional design studies (d=4 or 5) I would do a 3D plot, plot of $y=f(x_1, x_2)$ and then use several glyphs (colour and size for instance) ... |
I need to solve a rooting problem of a polynomial (the order of which is 2(N-1), where N=48).
So far I'm using Python Numpy algorithm (that relies on computing the eigenvalues of the companion matrix), but this is too slow solution for me. The polynomial can be written as:
$$\sum_{l=-N+1}^{N-1}D_{l}z^{l}$$
where $D_{l}... |
I am solving the steady-state incompressible Stokes equations in 2D:
\begin{equation}
\frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} = 0,
\end{equation}
\begin{equation}
\mu\left[\frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2}\right] - \frac{\partial p}{\partial x} = 0,
\en... |
I have a situation where I can generate a system of $M$ linear equations for $N$ variables ($N \ne M$). Implicitly this is of the form $Ax=b$ with $A \in \mathbb{R}^{M \times N}$, although I never explicitly construct $A$ (even as a sparse matrix), but I can evaluate $Ax$ implicitly for any vector $x \in \mathbb{R}^N$ ... |
I have been working on formulating my requirements in the form of an optimization problem in a multi-output regression setting.
Firstly, I would like to make the variables I used in the problem and their dimensions clear.
There are $Q$ outputs, $N$ samples, and $P$ covariates (features).
$\hat{Y}\in\mathbb R^{Q\times N... |
I have programmed a couple of Matlab implementations of nonlinear Conjugate Gradient methods (Fletcher Reeves and Polak Ribeire). However, I am concerned with how many steps it's taking to optimise the function $f(x,y) = x^2 + 5x^4 + 10y^2$, roughly 100. I have read that the bound for convergence is $O(n)$ where $n$ is... |
I'm interested in studying the effect of mesh size on the behavior of the solution curves of 1D convection-diffusion problem.
$$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$
I could use MATLAB's pdepe solver to solve the above system.
function sol=so()
format s... |
In a code that I work with (written in python, but also tagging as matlab because numpy is so close and I could use it if need be), we use a transfer matrix method to compute the properties of a physical system. That is, for a particle at initial position $\vec{x}_i$, we compute the final position as
$$\vec{x}_f = \ha... |
If we discretize a parabolic pde to obtain the system of ODE's
$\frac{\boldsymbol{B}}{\Delta t} \boldsymbol{u}_k = (\boldsymbol{K} + \frac{\boldsymbol{B}}{\Delta t}) \boldsymbol{u}_{k-1} + \boldsymbol{f}_k$ where $\boldsymbol{B}$ is the mass while $\boldsymbol{K}$ is the stiffness matrix, is there any condition on $\fr... |
I will appreciate if I may find someone how can clarify for me the part regarding the quality of feature descriptor, shown in the figure below:
and this screenshot is from the article: SHREC
All my problem is that I'm not able to understand the situation clearly, appreciate simple words hoping to understand.
Further i... |
Suppose we have a linear objective function that we want to maximize.
All variables are from the set of reals.
We have a constraint of the form:
$$\max(x_1,x_2) + \max(x_3,x_4)\leq c\,, \text{ with } c\in\mathbb{R}$$
Can we transform this such that we obtain a linear program?
I have read that constraints of the form
$... |
I'm solving the following 1D transport equation in MATLAB's pdepe solver.
$$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$
At the inlet (left boundary), Dirichlet boundary condition is applied $C(1) = C_L$ . (1 is the inlet node number)
At the outlet (right bound... |
I am a newbie in FEM. I would like to get clarity regarding a few questions on shape functions in this post (please use as simple language as possible).
What is the relation between Shape function and Degrees of freedom of any element? Are shape function chosen based on DOF of the element?
What all parameters of a sys... |
How can I convert a local shape function given in terms of normalized/natural coordinates to global shape function in terms of x and y coordinate system in Hermitian cubic shape function.
Please explain using a 1 Dimensional problem.
What is a general expression for Hermitian cubic shape function.
|
I am working on voting behavior using game theory. I have a simultaneous move Bayesian game with n-players (voters) who have to vote for one of two candidates or abstain.
Are there softwares or packages for solving such n-player games (finding the Nash equilibria or even approximate Nash-Equilibria) or any other way to... |
I am attempting to numerically solve the following problem. I decompose it into a system of two first order ODEs and then solve via the shooting method. I use the fourth order Runge-Kutta (RK4) method to solve each iteration of the shooting method.
$$k \frac{d^2T}{dx^2}=h(T-T_{\inf}) + \sigma(T^4-T^4_{surr})\\
T_{inf} ... |
I'm reading a paper right now which criticizes a method because it uses trapezoid rule, rather than "more advanced quadrature rules like the Gauss quadrature"...
The Gaussian quadrature rule requires, given $N$, the calculation of a bunch of weights and nodes. After these weights and nodes are known, the integral can b... |
In order to compute $$ \hat{f}_k = \sum_{m = 0}^{M - 1} e^{-2\pi i k m \theta} f_m, \ \ k = 0, ..., M - 1$$
for any $\theta$, my book states that this can be done using fractional Fourier transform as follows.
So, as you can see, they define the $c$-vector, then the $g$-vector, and then the final equation is a 2-ti... |
What is fasted way to find roots of second order polynomial up to single decimal point using a program.
|
I am studying the different topology optimization methods. There are numerous resources out there but when it comes to comparing different algorithms, in terms of strengths and weaknesses most of these resources remain very ambiguous and don't give a clear feedback on why a method is more advantageous compared to one o... |
Does the convergence rate of multigrid depend on the total number of smoothing steps or on the number of pre and post smoothing steps seperately?
|
The optimization problem is
$$\min_{x\in K} \|h - x\|_2$$
where
$$K = \{v\in R^n : \exists \lambda \geq 0\ v_1=v_2=\ldots=v_k=\lambda \ \text{and} \ |v_i| \leq \lambda \ \text{for} \ i=k+1,\ldots,n \}$$ , where $h, k, n$ are all known.
Could someone tell me how to write down this constraint in cvx? I couldn't think o... |
How come Finite Volume Method(FVM) handle the unstructured meshes and Finite difference Method cannot, whereas in FVM to approximate the fluxes at the boundary we use the central differencing?
My understanding is that in FDM, to apply Taylor series, we need lines on which other independent variables are constant (as on... |
This is a follow up to my previous post here
I'm solving the following 1D transport equation .
$$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$
At the inlet (left boundary), Dirichlet boundary condition is applied $C(1) = C_L$ . (1 is the inlet node number)
At th... |
Recently I have stumbled upon this video of M. J. Gander https://www.youtube.com/watch?v=dn5vqN8ezuE
and the coresponding notes that he wrote on Time Parallel Time Integration and I find it a quite interesting topic.
I would like to ask about the possible gain of applying the parareal algorithm to particle simulations... |
This question relates to the topic of locking free finite element development.
In the case of application of reduced integration to global stiffness matrix for the Timoshenko beam element with quadratic shape function of field variables, I get an integrand up to 4th degree in case I calculate this integrand with 2 Gaus... |
I have a vector field that represents a incompressible fluid flow (ie. divergence-free, ideally) that contains a certain percentage of vectors that are completely incorrect, due to the procedure used to obtain this field. These vectors thus do not follow the flow. The vector field is also noisy, and is not on a grid; t... |
I have followed different sources of information and achieved the following formulation for the ADF $t$ test statistics. I implemented it to run several hundred thousands of ADFs t statistics on GPU at once.
My formulation
Follows almost entirely Wikipedia convention
$$ \Delta y_t = \alpha + \beta t + \gamma y_{t-1} + ... |
I have solved the unsteady diffusion equation using piece-wise linear Finite elements(triangles) for spatial discretisation and Forward Euler for temporal discretisation. I have the following mesh convergence results. I'm not sure how to interpret them. The error was calculated using an analytical solution at time = 2 ... |
What I know 1=negative,0=positive
Example 1. 27-13=14
Example 2. -39+92=53
For example 1. 27 to binary is 11011
13 to binary is 1101
So 1101 change to two complement will be 0011. So for the calculation 11011+0011 gives me 11110. However the correct answer should be 1110, which is binary of 1... |
Multi-output ridge regression:
$$W^{*}=\underset{W}{\arg \min } \frac{1}{\mathcal{N}}\|Y-WX\|_{F}^{2}+\lambda\|W\|_{F}^{2}$$
There are $Q$ outputs, $N$ samples, and $P$ covariates (features).
$\hat{Y}\in\mathbb R^{Q\times N}$ is the prediction matrix,
$$\hat{Y}=WX$$
where $W\in\mathbb R^{Q\times P}$ is the parameter ... |
I'm solving the coupled ODE
$$ \left[\begin{array}{c}x^\prime(z)\\p_x^\prime(z)\end{array}\right] = C(z)\cdot\left[\begin{array}{c}x(z)\\p_x(z)\end{array}\right] = \left[\begin{array}{cc}0& A(z)\\B(z) & 0\end{array} \right]\cdot\left[\begin{array}{c}x(z)\\p_x(z)\end{array}\right] $$
using the implicit Euler method to g... |
Given three vectors in $\mathbb{R}^{512}$, my task is to compute a Minimum Volume Enclosing Ellipsoid (MVEE). I have tried Kachiyan's algorithm, but it requires at least as many vectors as there are dimensions, which I do not have at my disposal (attempts to create synthetic vectors resulted in useless ellipsoids).
Thu... |
I'm just doing a very simple experiment. I'm calculating wall shear stress based on Poiseuille flow for a pipe by using lattice Boltzmann method (LBM) and FEM to compare their values with the analytical solution, which is calculated as:
$$\tau = \frac{2 \mu u_\max}{R}$$
Where we have: $u(r) = u_\max \left(1 - (\frac{r}... |
What could be the arguments of using fractional Fourier transform instead of multiscale wavelet for data analysis ?
Optimization of the good time-frequency domain parameter? good in the sens of best time-frequency domains that minimize spectral entropy of the data. But often, best entropy is achieved in a full 100% fr... |
I have a matrix in Coordinate format and I will convert it to CSC. As a reference, the format I am using looks like this, but I am not using the pointerE matrix, which I think is superfluous.
My conversion algorithm seems quite slow and I am losing some time sorting the row data by row number. I can't figure out why ... |
For our Bachelors thesis we're trying to solve the Schrodinger equation $i\partial_tu = -\nabla^2u+Vu$ in FEniCS. Given the domain $[-5, 5]^2$ with an initial value of $u_0(x, y)=e^{(-2(x^2+y^2))}$ and with $V(x,y)=\frac{x^2}{4}+9y^2$ at time $T=2$ the solution $|u|^2$ should look like the following image given by our ... |
I'm trying to understand the influence of Neumann boundary condition while simulating 1D diffusion equation
$$
\frac{\partial C}{\partial t} = \nabla \cdot (D \nabla C).
$$
The initial value is set to 3 at the inlet node and the rest of the nodes are discretized to zero. Neumann boundary condition is used at both the l... |
For a project I'm doing, I have to numerically solve a nonlinear parabolic stochastic partial differential equation, of the form
$$
u_t = u_{xx} + f(u)(u_x)^2 + a(u) + b(u)W(t, x),
$$
where primes are derivatives with respect to $x$,
$W(t, x)$ is space-time white noise, $f$, $a$ and $b$ are smooth and in general nonli... |
This is a follow up to my previous post here,
I'm solving for convection in 1D
$$\frac{\partial C}{\partial t} = - v\frac{\partial C}{\partial x}$$
The discretization of the above equation is presented using a backward difference formula,
$$\frac{d C}{dt} = -v \frac{C_{i} - C_{i-1}}{\Delta x}$$
The boundary condition i... |
I am trying to solve the 2-d heat equation on a rectangle using finite difference method. I am confused as to how to incorporate non linear radiation boundary condition at the edge.
$-k\frac{\partial T}{\partial n}=\sigma\epsilon(T^4-T^4_{\infty})+h(T-T_{\infty})$
Is the following implementation reasonable?
$-k\frac{T^... |
ABAQUS gives a .inp file (in pre-processing stage) where the information with regard to the preprocessed model is defined, information such as geometry, mesh type, number of elements, boundary conditions, etc. This file is in turn used for the processing part in a solver. I have a solver that takes in .inp files and I ... |
I have a function f(x) = sin(x)/x^3 whose first derivative I am trying to estimate using 1st, 2nd and 4th order Finite Difference schemes. I tried to plot the truncation error in MATLAB and I found myself with increasing error with smaller step size. I am not sure where I am wrong. Attached is my code snippet.
syms y
d... |
The wall shear stress is defined based on Matyka et. al. eq. A.4:
$$\vec{\tau} = 2 \mu (\mathbf{S} \cdot \vec{n} - (\vec{n} \cdot \mathbf{S} \cdot \vec{n})\vec{n})$$
Where $\mathbf{S} = \frac{1}{2} (\nabla \mathbf{u} + (\nabla \mathbf{u})^{T})$ is shear rate tensor and $\mu$ is kinematic viscosity. There is one more po... |
As described in https://openfoam.com/documentation/user-guide/controlDict.php I can use
writeControl timeStep
writeInterval 1
purgeWrite 10
to keep the last ten timesteps while purging older ones. On the other hand I can use
writeControl runTime
writeInterval 0.1
(without purgeWrite) to get a permanent... |
I am trying to understand the difference between explicit Euler and semi-implicit Euler integration, where in explicit Euler the current position is calculated as
$$x_{n+1} = x_n + v_n$$
and semi-implicit Euler method where it is calculated as:
$$x_{n+1} = x_n + v_{n+1}$$
with $x$ being position and $v$ the velocity,
$... |
I am trying to learn about basics of computational fluid dynamics, at the moment on the simple example of linear advection in 1D.
I am am currently testing the theoretical predictions of the order of accuracy of different methods, and the results that I am finding are not what I would expect them to be, and I don't und... |
I am trying to implement a basic level set program for fluid simulation in C++ and visualize it using SFML, so far I have the following simple program for propagating a circular curve:
https://gist.github.com/BhayanakMoth/da8250c849aeead098a61afbf655fb76
However, I am not sure if this the correct way.
Since I am workin... |
I would like to solve this equation (which is adapted in my case, a plug flow reactor when a reaction occurs):
$ \frac{df}{dt} = D \frac{d²f}{dz²} - u \frac{df}{dz} + r(z,t) $
with $r(z,t)= - k f^{n}$ (f power to n) where $k$ and $n$ are positive kinetic constants.
$r$ is the local reaction rate. $D$ is the dispersion... |
I try to get into GMRES via Arnoldi-Decomposition. For my understanding, I Implemented the Arnoldi-Decomposition in python.
import numpy as np
n = 5
A = np.random.rand(n,n)
v = np.random.rand(n)
M = np.zeros_like(A)
M[:,0] = v
for i in range(1,5):
M[:,i] = np.matmul(A,M[:,i-1])
d = np.linalg.matrix_rank(M)
V = np... |
I would like to solve some equations which basically look like this
$$\frac{\partial u}{\partial x}=F\left(v,\frac{\partial v}{\partial y},\frac{\partial^2 v}{\partial y^2}\right),$$
$$\frac{\partial v}{\partial x}=G\left(u,\frac{\partial u}{\partial y},\frac{\partial^2 u}{\partial y^2}\right).$$
My current plan is to ... |
I've implemented an algorithm that can calculate the cofactor-matrix of a matrix in $\mathcal{O}(n^5)$.
The algorithm just step-by-step iterates over the whole matrix ($\mathcal{O}(n^2)$) and for every $(i,j)$ in the matrix, it then calculates the determinant of the "sub-matrix" (leaving off row $i$ and column $j$) by... |
I already know the Big O for partial pivoting is $O(n^3)$ and remain the same for complete pivoting. I also know the big theta complexity for partial pivoting is $2/3 n^3$
I would like to know the complexity of complete pivoting in big theta
|
As the title said, I want to solve a coordinate transformed heat equation using fourier spectral method. In particular, I am interested in transforming an uniform grid into an adaptive non-uniform grid.
Without the transformation, the heat equation on an uniform grid $ \xi $ is
$$U_t = U_{\xi\xi}$$
We can solve it num... |
In my simulations I am using dense matrix-vector multiplications and 2D-fft transformations quite often, for matrix sizes of 8kx8k and up. Hence, I assume that using a GPU is beneficial for speeding up my code.
The problem is, though, that my development PC does not have an external GPU, and does not support the additi... |
Does the velocity Verlet handle variable time steps? I found controversial statements about it.
In the paper Skeel, R. D., "Variable Step Size Destabilizes the Stömer/Leapfrog/Verlet Method", BIT Numerical Mathematics, Vol. 33, 1993, p. 172–175. the author proves that the Verlet methods, including the leapfrog (velocit... |
I am trying to write a multigrid solver for Poisson's equation, $-\Delta u=f$, on the unit square, $\Omega=(0,1)^2$ with periodic boundaries. My primary source has been Multigrid by Trottenberg, Oosterlee and Schuller, 2001. Based on their discussion I'm using the standard 2nd order central difference for the derivativ... |
Are there any well-known optimization libraries (ideally with Python bindings or even in Python) supporting (unconstrained) minimization (of $f:\mathbb{R}^n \to \mathbb{R}$ for $n$ for $n\sim 10^1,10^2$) with support for arbitrary precision input/output?
I have a (mathematical physics) problem where I genuinely want to... |
I would like to perform a matrix multiplication like:
$C=A*B*A'$
using cusparse library function cusparseDcsrgemm2.
To do this I split it into two matrix-matrix multiplications where all matrices are stored in CSR format with zero based index which is specified in the cusparse matrix description.
However the first m... |
I am trying to solve a system of differential equations using finite difference method.
There are few terms of the form $\frac{A(r)}{r}$, both $A(r)$ and r go to zero at the boundary. Analytically this term is well defined but numerically these terms are leading to error which very quickly break the simulation.
I am u... |
I want to apply the weighted least squares method in order to identify parameters of a dynamic process. The process is described by a second order differential equation of the form:
$$ \ddot{y}+a_1\dot{y}+a_2y=b_0u $$
where $\ y,u $ are the output and input of the process respectively and are measured as well. The unk... |
Let $\vec{a} \in \mathbb{R}^\alpha$, and let $H$ be a rank 3 tensor with dimensions $M_{[i \in \mathbb{N}]} \times N_{[j \in \mathbb{N}]} \times \alpha_{[k \in \mathbb{N}]}$ (where the subscript are the indexing of each one of the dimensions).
We can analogously look at the tensor $H$ as a matrix $H'$ which each elemen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.