# All Questions

7,522 questions
389 views

### 2D Neumann Conditions on Irregular Domain

I would like to model the 2D diffusion equation with Neumann BC's inside the following egg-shaped domain: I would like to use the finite difference method with the discretization implied by the image ...
61 views

23 views

### In-exact line search

In my class notes, the author says: "If $f:\mathbb{R}^n \to \mathbb{R}$ is bounded below and $p_k$ is a descent direction and the $\alpha-\beta$ also known as Armijo-Goldstein condition is met then ...
16 views

### How to model a hysteresis behavior using MILP on CPLEX?

The question is below: 1: y[t]=10,if x[t]>=2; 2: y[t]=-1,if x[t]<1; 3: y[t]=y[t-1],if 1<=x[t]<2. How to model the function in cplex using c++? Thank you very much! My model is added as "...
41 views

### gsl-config: command not found HPC cluster [on hold]

I am trying to install the gsl libraries in a HPC cluster, so I don't have root access. I am following the instructions here. The problem is that when I type ...
30 views

### System of coupled differential equations

I have a system of non linear coupled differential equations. I would like to use the finite difference to solve t but some left BCs are missing (though I have enough BCs to make it well posed). Can I ...
82 views

### Calculate distance between observer and cube excluding the distance inside the cube

I am trying to calculate the distance between two points where one is an observer and has no size and where the other point is a cube with the dimensions {1, 1, 1}. The distance will be the distance ...
41 views

42 views

### Average value divergence in spectral method for Poisson equation

I'd like to know how to deal with a divergence when trying to solve the Poisson equation for electrostatics with a simple spectral method. I'm not sure how to best state my problem, so I'll explain ...
62 views

### How well do finite volume methods ensure that no flux flows perpendicular to the flux vector?

Finite volume methods find approximate solutions to equations of the form: $$\frac{\partial \vec{u}}{\partial t}+\nabla\cdot(\vec{f}(\vec{u}))=0.$$ My question is has anyone done any analysis on how ...
868 views

### Explicit scheme for heat equation with Neumann boundary conditions in Maple

$\displaystyle \frac{\partial u}{\partial t}=\alpha(x,t)\cdot \frac{\partial^2 u}{\partial x^2}+b(x,t)$ $u(x,0)=f(x)$ Initial condition $u_x(0,t)=0$ 2nd type Boundary condition $u_x(1,t)=0$ 2nd ...
136 views

### MPI data broadcast or not in C

I have two slightly different but getting the same results MPI code. The first one is from an open-source package having several data exchange steps in between: ...
72 views

### Analytical convergent sequence and numerical divergent sequence

Is it possible to construct a sequence that converges in theory but when computed numerically with a computer program is diverging. I feel that today our computer programs doesn't allow such ...
92 views

### Efficient root finding algorithm for monotonic function

This is my first time asking a question here, so I may not be asking this in the right place. I am trying to find the roots of a monotonic function with as few function evaluations as possible. I ...
60 views

261 views

### Suggest methods and basis sets for a variety of systems [closed]

Please help me with any/all of the cases below. In the following cases, the named method and basis set are not suitable for the chemical systems. Why aren't they? Could you suggest a suitable method/...
81 views

### Optimal way of comparing the lines of different files

I have 1600 ASCII files with 1000 lines in each file. Each line has only one entry and is a floating point number e.g. 1.67923. Let's denote the line1 of file1 with ...
99 views

### Derivation of backward differentiation formulas(BDF)

I have been reading upon numerical techniques that are used to solve stiff ordinary differential equations. From the description given here, I could follow the steps till equation (5). I am finding ...
334 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 ...
443 views

### Help with Fourier beam propagation method

I am working on implementing the Fourier beam propagation method in C++. I am really more of a programmer than a physicist but I think I have a good understanding of what I am trying to do. Here is ...
79 views

### DFT of $g(\omega) \exp(i C \omega^2)$. How to do it ,if uniform sampling requires too much memory?

I have a following problem : I want to transform a function $g(\omega) \exp(i C \omega^2)$. $g(\omega)$ is real and limited. It changes slowly compered to $\exp(i C \omega^2)$. I have a black box that ...