# All Questions

9,432 questions
Filter by
Sorted by
Tagged with
96 views

### Newbie help on FEM contact problem

I am modelling the time-evolution of a soft material with a tetrahedral mesh. I use an FEM method to compute the forces on each node, and then numerically integrate the positions and velocity of the ...
1k views

### Faster code for double integration using Gauss-Legendre quadrature

I came with a the following code to evaluate a double integral using Gauss Legendre quadrature in MatLab ...
35 views

### Generating pseudorandom sequences based on measured sequences

I'm looking for an algorithm to generate discrete-time pseudorandom sequences based on other sequences I already have that would be used to train the algorithm. More specifically, I have some time-...
329 views

### Applying Runge-Kutta to nonlinear system of PDEs

I am applying a 4th order Runge-Kutta code, using the method of lines, to solve the following: $$\frac {\partial y_1}{\partial t} = y_2 y_3 - C_1 y_1$$ \...
238 views

2k views

### optimization non linear problem with java code

Is there some packages in java that can be included to eclipse in order to solve a non linear problem? I have used ipopt but when running, there is a notification which say "NOTE: You are using Ipopt ...
130 views

### 2d Schrodinger Equation via matrix diagonalization in C

I am trying to solve the time-independent Schrodinger equation in two dimensions via discrete matrix diagonalization. I want the energy eigenvalues and the corresponding eigenfunctions for a given ...
118 views

### RK4 for stiff IVP

I need a solver of stiff Inital-Value Problems (IVP) in python exploiting RK4 preferably explicit. I have been searching for past few days but could not find it. Following are my queries: Does the ...
576 views

### Pde problem with robin boundary condition

I have my pde 2D problem with robin condition (form: du/dn +ku=g) to solve with matlab. i have the exact function u and I want to find the function g in robin condition. How can i do it? thanks for ...
137 views

### How to solve system of equations with almost-zero determinant?

I have a system of equations that I am trying to solve. In matrix form, it's written as $$x(I - S) = b.$$ I am solving for $x$, where $I$ is the identity matrix and $S$ is a matrix where each column ...
208 views

### Solving coupled ODEs using Runge-Kutta method

I want to solve the following sets of $n$ coupled equations. Initial values of $x_{n}(t)$ and $p_{n}(t)$ are specified. The problem is, I have an 1D lattice where every particle is bound with ...
80 views

### Is it possible to simulate life? [closed]

Has anybody ever managed to simulate even the simplest form of life by merely simulating the interactions of the molecules of the organisms body? What would be the theoretical minimum number of ...
3k views

66 views

### Detecting degenerate triangles with very thin structures

Between the two ears in the following bunny images, there are some degenerate triangles I want to detect. It looks like a volume-less thin slits. If the question is not clear, please let me know.
78 views

### Numpys tensordot and what is happening mathematically

I've encountered a program where np.tensordot was used, so I tried looking it up but I can't really understand what this function is doing... I feel rather ...
145 views

### Simulating 1D diffusion

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 ...
205 views

### How to use natural logarithm inside Expression on FENICS

I'm trying to evaluate the exact solution of heat diffusion in circular plate. I'm not able to use the natural logarithm inside expression. ...
371 views

### Which ODE solver in Matlab allows me to advance in just one timestep only

[t,y] = odeXX(odefun,tspan,y0) I have a solver odeXX, and the tspan = [0 0.0001]. It seems that for any ode solver in MATLAB, they integrate by breaking ...
417 views

### Finite Difference for Fourth-Order PDE

How to discretize the following 4th order PDE using finite difference method? $$\frac{\partial^{2} y}{\partial t^{2}}+\frac{\partial^{4} y}{\partial x^{4}}=0$$ thanks
59 views

### Is it possible to find a formula for a set of number from the result? [closed]

I have these two sets of number, I also have a result. Is it possible to compute the relation between them so that I can figure out how the result is generated ? for example I have : Set A=4 6 12 25 ...
159 views

### How to solve numerically such system of equations

I have a system of equations $$S_{m}(\xi) +P_{m}(\xi)=f(\xi)$$ where $\xi$ can be choosen arbitrary in some domain in $\mathbb{C}$, $f$ is known, $P_m$ is a polynomial of degree at most $m$. ...
66 views

### Combinatorial Optimization Problem with Constraints

To explain my problem I'd like to go with an example first. Suppose I have many bills of grocery purchases in the same shop. On the invoices I can only see the total amount of the invoice and which ...
60 views

### Converting for loop from matlab to python

I am converting some MATLAB code in to python and have the encountered the error "ValueError Traceback (most recent call last) in 1 for ig in range(nbas): ---->...
40 views

### How to connect two cylinders to form a knee in Comsol Multiphysics?

I have this I want it to be single bended wire. How to accomplish?
96 views

Abstract I have the next equation to find a force, for my problem: $$U=-\int \vec{m}\small{(x)}\times \vec{B}(x)dV$$ $$\vec{F}=-\nabla U$$ Considering 3-dimensional space with x,y,z coordinates, ...
39 views

### Why does this line of code give a flat distribution?

I'm struggling to understand a line of FORTRAN code and was hoping someone on here would be able to help me out. These lines of code are meant to generate a flat distribution - I understand that GRNDM(...
158 views

### Solving a large system of coupled ode. (Python)

I really have a problem here. I have not found a solution yet. The system I need to solve similar to this:(Basic idea) $$c_1 = \dfrac{dx}{dr}+y$$ $$c_2 = \dfrac{dy}{dr}+x$$ Both $c_1/ c_2$ are ...
100 views

### If not MATLAB, what software/programming language should I use to simulate/animate wave functions in various potentials + more? (example given)

I want to integrate programming into my learning in math and science in a very specific way. I want to create visualizations and simulations of concepts I am learning. When I learn a numerical method ...
45 views

### Matrix requirements for cusparse*csrgemm2

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 ...
18 views

### How to Collect fraction in Maple 18? [closed]

Suppose I have $$f=\frac x 3+ \frac y 3 +\frac z 3$$ And I want to use collect(f, 1/3) And I wish it will displays $$f=\frac1 3(x+y+z)$$ But it doesn't work....
66 views

### Smoothed Particle Hydrodynamics: Weird clustering of particles. Is that normal?

I implemented a rather simple SPH simulation using a cubic-spline-kernel and a simple non-iterative pressure solver as described in this PDF in equation 9. I followed algorithm 1 of that paper (...
31 views

### Minimize squared error of linear function

Let $M$ be a $m \times n$ matrix, $x$ a $n$-vector, $y$ a $m$-vector, and $\|\cdot\|_2$ represent the $L_2$ norm (i.e., Euclidean norm). Given $M,y$, the goal is to find $x$ that minimizes the ...
2k views

### Scipy Two-point Boundary value Problem

Nonlinear ODE Statement I would like to use scipy to solve the following: u'' + (u')^2 = sin(x) u(0)=0, u(1)=1 where u = u(x). Approach I am looking at the ...
74 views

### Relation of Condition of a Matrix and Convergency

Can anybody explain me the relation between the condition of a Matrix and the convergency of a problem. For example how is the relation between the condition of the stiffness Matrix occuring in FEM ...
73 views

### Anyone knows where I can find a simple FEniCS code where I can understand basic implantation? [closed]

I found this one, but does not work: http://www.karlin.mff.cuni.cz/~hron/warsaw_2014/pl2014_lecture5.pdf
620 views

### Stability analysis for coupled nonlinear system of partial differential equations

I'm trying to solve a nonlinear partial differential equation $$L(u_{xxtt},u_{xx}u_{tt},u_{xt}^2,u_{xt},u_{tt})=0$$ using finite difference methods. In order to remove the ...
63 views

### I have a problem in finding the exact area and estimating the error [closed]

The program should first read from the keyboard the values of a and b then estimate the area under f(x) in the interval [a, b] using Simpson’s 1/3rd rule and display the estimated area and the error ...
153 views

### Problem using MATLAB fminunc [closed]

I am trying to find the minimum of this function. But I receive the following error when I run the script. What am I doing wrong: ...
385 views

### How to initiate spirals in this model?

I am trying to reproduce Tang & Othmer paper which is related to excitations and oscillations in G-protein model in Dictyostelium discoideum, an amoeba species. The mathematical model in the paper ...
84 views

### Is iteration an efficient algorithm in this case? [closed]

My task in numerical analysis is We are interested in finding values of β0 for which z(x) = 2500. Use an efficient algorithm to determine the rays which pass through the receiver. Now I'm just ...
233 views

### Solving large system of equations, is linear programming best option? [closed]

I have a problem where I am trying to solve many systems of equations, that have very few variables per equation, but a lot of equations. For example potentially 10 variables max in a single equation,...