Science topic

Finite Difference - Science topic

Explore the latest questions and answers in Finite Difference, and find Finite Difference experts.
Questions related to Finite Difference
  • asked a question related to Finite Difference
Question
7 answers
I've done this, but the results don't make sense. I want to run it for high Reynolds numbers, like 10000, and eventually calculate the energy spectrum, but the results are not reasonable. Could you help me with this?"
Relevant answer
Answer
Here’s a basic for your MATLAB code:(m-file)
% Parameters
L = 1; % Length of the domain
N = 200; % Number of spatial points (increase for better resolution)
dx = L / (N-1); % Spatial step size
x = linspace(0, L, N); % Spatial grid
nu = 1e-4; % Viscosity
dt = 0.0001; % Time step size (reduce for stability)
T = 1; % Total time
Re = 10000; % Reynolds number
% Initial condition
u = sin(pi*x);
% Time integration using RK4
for t = 0:dt:T
k1 = dt * burgers_rhs(u, nu, dx);
k2 = dt * burgers_rhs(u + 0.5*k1, nu, dx);
k3 = dt * burgers_rhs(u + 0.5*k2, nu, dx);
k4 = dt * burgers_rhs(u + k3, nu, dx);
u = u + (k1 + 2*k2 + 2*k3 + k4) / 6;
end
% Plot the result
figure;
plot(x, u);
xlabel('x');
ylabel('u');
title('Solution of Burgers'' Equation');
% Compute the Fourier transform
U_hat = fft(u);
% Compute the energy spectrum
E = abs(U_hat).^2 / N;
% Plot the energy spectrum
k = (0:N-1) * (2*pi/L);
figure;
loglog(k, E);
xlabel('Wavenumber k');
ylabel('Energy E(k)');
title('Energy Spectrum');
% Function to compute the RHS of Burgers' equation
function rhs = burgers_rhs(u, nu, dx)
N = length(u);
rhs = zeros(size(u));
for i = 2:N-1
rhs(i) = -u(i) * (u(i+1) - u(i-1)) / (2*dx) + nu * (u(i+1) - 2*u(i) + u(i-1)) / dx^2;
end
% Boundary conditions
rhs(1) = 0;
rhs(N) = 0;
end
  • asked a question related to Finite Difference
Question
8 answers
Consider the advection-diffusion equation ∂/∂t U + ∂/∂x F(U) = ∂/∂x ( D(U) * ∂/∂x U ). I know that on uniform grids we can use central differences to approximate the advection term as
∂/∂x F(U) |_{i} = ( F(U)|_{i+1} - F(U)|_{i-1} ) / Δx + O(Δx^2),
and the diffusion term as
∂/∂x ( D(U) * ∂/∂x U ) |_{i} = ( D(U)|_{i+1} + D(U)|_{i} ) * ( U|_{i+1} - U|_{i} ) / (2 * Δx^2) - ( D(U)|_{i} + D(U)|_{i-1} ) * ( U|_{i} - U|_{i-1} ) / (2 * Δx^2) + O(Δx^2).
I was wondering if we have second order formulas similar to these for a non-uniform grid, where Δx |_{i} is different than Δx |_{i+1}. I found some works for the advection term, but none for the diffusion one. Is it even possible? Would you provide references? Thank you!
Relevant answer
Answer
Thank you Geraldo J B Dos Santos , for your contribution. I have myself generated a similar formula for non-uniform grids. However, by keeping track of the remainders I noticed my formula did not have a second order truncation error, which is why I posed the question. Interestingly, numerical methods showed the convergence was indeed second order and that confused me. When Filippo Maria Denaro gave me the reference above, I finally understood that even though the truncation error may be first order, the convergence is assymptotically second order. That clarified this for me, thank you all!
  • asked a question related to Finite Difference
Question
4 answers
There is a problem of constructing a PINN based on an integro-differential equation in Tensorflow. Its simplified form is shown on the picture. The function h has no analytical solution. The differential part is calculated quickly with AutoDiff, but there is a problem with the integral part. In the full formulation, I need to calculate several double and triple integrals. I calculate them by finite differences, which makes the calculation slow down a lot. Is there any way to get away from finite-difference integration in the problem shown in the picture? I would be grateful for a hint or an example of a similar solution.
Relevant answer
Answer
Hello, you may need to investigate a solution using the Laplace and/or Mellin transforms. I have not tried myself but I can see that you could try the Laplace and/or Mellin transform of derivatives in the left side and f(of integral) in the right side; I suspect you may need to know f(x) so you can transform the f(g(x)) using the relation between the Mellin transform and other integral types (Weyl, Stieltjes, Hankel, Laplace, etc).
  • asked a question related to Finite Difference
Question
2 answers
Consider a person who has never heard of symplectic Euler but knows about Initial Value Problems, forward Euler, backward Euler, and Taylor series. Say, you are required to give them an idea of what the symplectic Euler method is in a short manner only for the case of a typical initial value problem of the second order. Would the attached illustration be acceptable?
Or would it create confusion that it is a combination of forward Euler and backward Euler?
*If you think the question has already been answered. Don’t leave it. Please leave a response since I’d like to hear as many responses as possible.
Relevant answer
Answer
explanation is quite good but you should point on that the value V in is taken from a new time layer
  • asked a question related to Finite Difference
Question
5 answers
My question is that how we can evaluate the real and imaginary part of impedance of a THz absorber by using the finite difference time domain (FDTD) simulation software.
Relevant answer
Answer
  • asked a question related to Finite Difference
Question
6 answers
I have some nonlinear PDEs that I wish to solve numerically. My initial stab at the solution seems to be very naive. I discretised the PDE using finite differences, and this leaves me with a set of nonlinear algebraic equations at each time step. To my simplistic mind, I can solve these using the Newton-Raphson method.
I tried this method and I can't get the solution to converge for some reason. Was my idea wrong from the outset?
Relevant answer
Answer
Hi Mat! I hope that all is well.
I use NR to solve sets of discretised nonlinear equations all the time. The first type of problem that I used the method on were nonsimilar boundary layer equations where I used the Keller-box method. More recently I've solved a set of equations for what are, in essence, Fourier coefficients. This system is very highly nonlinear.
In both cases (and others) the Jacobian matrix is computed within the code rather than specified by the programmer.
It may be necessary for some applications to solve each NR iteration using a block tridiagonal solver.
I don't mess around with Matlab for this. Good old-fashioned Fortran works very well for me.
I will say that, once you've cracked it you'll be dancing. So yes, persevere!
  • asked a question related to Finite Difference
Question
1 answer
I wonder HEC-RAS 2D Only uses "Finite Difference" mothod for solving the equations or it may utilize other numerical methods (Such as "Finite Volume", etc.) for this purpose?
Relevant answer
Answer
HEC-RAS can solve the 2-D Shallow water equation using a finite volume approach.
  • asked a question related to Finite Difference
Question
3 answers
I intend to use analytic derivatives for solving a low thrust trajectory optimization problem via indirect optimal control. Finite difference derivatives are not accurate enough to achieve convergence. In literature, it is mentioned that state transition matrix can be used with chain rule to obtain required analytic partial derivatives. But implementation details are missing.
I am looking for some examples, where it is in action. Any relevant pointers are highly appreciable.
Relevant answer
implementation details are missing anyway, for analytical derivatives, use of flow thrust trajectory optimization problem via indirect optimal control is applicable Finite difference derivatives are not accurate enough to achieve convergence in some perspectives, this can be done through transition matrix using instance of chain rule to derive required analytic partial derivatives.
  • asked a question related to Finite Difference
Question
8 answers
Considering the dynamic characteristics of energy systems, such as gas network and district heating network, we often use partial differential equations to discribe them, then solve them by Euler finite difference technique. While in the state estimation, how to deal with the states of the new nodes added by the difference technique?
Relevant answer
Answer
Chun Qin , you can use the discretization error in the extra states arising from finite difference approximation as an extra source of noise. This is reasonable and works well if the error is 'well behaved' (e.g. is not always positive for most or all operating points etc).
  • asked a question related to Finite Difference
Question
3 answers
Please, how can I use the Newmark method in time in conjunction with the finite central difference in space for the Euler Bernoulli beam equation using Matlab or C (I'm a beginner, and don't have many skills in Matlab or C)?
Relevant answer
Answer
Thank you, Syed Haseeb Shah and
Rajesh Kumar Deolia
.
  • asked a question related to Finite Difference
Question
11 answers
Hi
I'm solving nonlinear second order equation by using finite difference method . finally for calculating value at any desired node, knowing three preceding nodes is required however by knowing boundary condition just one of these nodes becomes obvious and still knowing two other values is necessary. it must be noted there are plenty of guesses for values of these nodes which lead to compatible response.
Relevant answer
Answer
please write the ODE, not only the discretization You used.
however, for multi-step methods you need to create the starting values using a single-step method for all required nodes. Use a discretization of the same accuracy.
Note that the second order ODE could be written as system of two first order ODE.
  • asked a question related to Finite Difference
Question
3 answers
I've been using GMAT in my free time to optimize trajectories, and have varied burn component values and spacecraft states, usually with success. The vary command in GMAT, with the Yukon optimizer that I am using, has the following parameters that can be changed:
  • Initial value: The initial guess. I know the gradient descent optimization method that GMAT uses is very sensitive to initial conditions and so this must be feasible or reasonably close.
  • Perturbation: The step size used to calculate the finite difference derivative.
  • Max step: The maximum allowed change in the control variable during a single iteration of the solver.
  • Additive scale factor: Number used to nondimensionalize the independent variable. This is done with the equation xn = m (xd + a), where xn is the non-dimensional parameter, xd is the dimensional parameter and this parameter is a.
  • Multiplicative scale factor: Same as above, but it's the variable d in the equation.
For the initial value, I can usually see when my chosen value is feasible by observing the solver window or a graphical display of the orbit in different iterations. The max step is the most intuitive of these parameters for me, and by trial and error, observation of the solver window and how sensitive my target variables are to changes in the control variables I can usually get it right and get convergence. It is still partially trial and error though.
However, I do not understand the effect of the other parameters on the optimization. I read a bit about finite difference and nondimensionalization/rescaling, and I think I understand them conceptually, but I still don't understand what values they have to be to get an optimal optimization process.
This is especially a problem now because I have started to vary epochs (TAIModJulian usually) or time intervals (e.g. "travel for x days" and find optimal x, or to find optimal launch windows), and I cannot get the optimizer to vary them properly, even when I use a large step size. The optimizer usually stays close to the initial values, and eventually leads to a non-convergence message.
I have noticed that using large values for the two scale factors sometimes gives me larger step sizes and occasionally what I want, but it's still trial and error. As far as perturbation goes, I do not understand its influence on how the optimization works. Sometimes for extremely small values I get array dimension errors, sometimes for very large values I get similar results to if I'm using too large a max step size, and that's about it. I usually use 1e-5 to 1e-7 and it seems to work most of the time. Unfortunately information on the topic seems sparse, and from what I can tell GMAT's documentation uses different terminology for these concepts than what I can find online.
So I guess my question is two-fold: how to understand the optimization parameters of GMAT and what they should be in different situations, and what should they be when I want GMAT to consider a wide array of possible trajectories with different values of control variables, especially when those control variables are epochs or time intervals? Is there a procedure or automatic method that takes into account the scale of the optimization problem and its sensitivity, and gives an estimate of what the optimization parameters should be?
Relevant answer
Answer
Not sure what you are looking for but I think you can use Automatic Differentiation libraries like #Casadi #yulmip, I prefer Casadi, because it is easy to use, you can simply define your objective function and your constraints
  • asked a question related to Finite Difference
Question
9 answers
I've been trying unsuccessfully to solve the 1D diffusion equation in spherical co-ordinates using finite differences. For the life of me, I cannot get the thing to work. Is this a known phenomena? What is the usual method used for this seemingly simple task?
Relevant answer
Answer
Spherical polars, rather than Cartesians.
  • asked a question related to Finite Difference
Question
4 answers
I am trying to solve a time-dependent diffusion equation with finite-difference discretizations using the Newton–Raphson method. However, I encountered some problems in convergence--the solution result changes when changing time step size. Here I want to find some coding examples to refer to. Thank you.
Relevant answer
Answer
In general, the name diffusion equation (time dependent or not) identifies a linear PDE, whose finite difference discretization leads to a linear algebraic problem that does not require a nonlinear solver like Newton Raphson. This means that your problem is a nonlinear one, for example with nonlinear viscosity (porous media equation and such), and that an implicit method is being used for the time discretization. The correct way to approach these problems is to write the space and time discretization (there is no mention of what time discretization method is used) which leads to a (potentially large) nonlinear system to be solved
at each time step. Then at each time step a nonlinear solver is used to compute the solution of thie algebraic problem. Any of these steps might have been coded incorrectly leading to the problem you mention. One simple way to check what is going on is to compare with the results of a simple explicit method (say forward Euler) employed with a very small time step, such a method would not require NR iterations and therefore any incorrectness in the NR solver would not affect it.
  • asked a question related to Finite Difference
Question
4 answers
What are advantages of FOM and FMM over other FDMs?
All theses methods are used for solving BVPs of ODEs and PDEs.
Relevant answer
Answer
In addition to answer of Mesfin, the following link explain the answer in a simple clear way
  • asked a question related to Finite Difference
Question
2 answers
I am looking for the latest approaches to find the band-gap of Phononic / Periodic materials. In this regard, if anyone knows a reference (in detail) for Finite Difference Time Domain (FDTD) theory along with the Bloch method, please share.
I really appreciate any help you can provide.
Relevant answer
Answer
For arbitrary unit cells, your best bet is an eigenmode simulation. Sweep the Bloch phase shifts across the various axes from 0 to pi and solve for the eigenfrequencies. The regions in which there are no found eigenfrequencies are your band gaps.
  • asked a question related to Finite Difference
Question
5 answers
I wonder that if anyone tried SOR method for unsteady problem discretized by finite difference or finite volume method. Does it converge faster AND solve faster when it is compared to Gauss-Seidel and Jacobi solver?
Relevant answer
Answer
SOR will converge faster than GS or Jacobi methods if the relaxation factor is chosen well. If, by diffusion equation, you mean Fourier's equation, a linear equation, then SOR will be perfectly fine. Easy to encode and not complicated. BiCGSTAB etc are powerful methods but are unnecessarily complicated for something like this. Quasi-Newton methods are for nonlinear equations. But if you have a nonlinear diffusion equation then these more powerful methods may well be the way to do it.
  • asked a question related to Finite Difference
Question
5 answers
I want to study the effects of some parameters on elution phase of chromatography using lumped kinetic model (LKM) but I have writing the MATLAB code. I want to solve this using finite difference and Euler method. I have attached the equation. Can anyone please help me out?
Relevant answer
Answer
I hope it helps you
  • asked a question related to Finite Difference
Question
5 answers
For a low-pass FIR filter h[n], the common normalization rule is with regards to H(j0), i.e., sum(h[n]). Then, how about the normalization rule for finite difference filters? For example, given h1[n] = {1, -1} and h2[n] = {1/2, 0, -1/2}, and they have been properly normalized according to the meaning of finite difference. Notice that both have a positive number and a negative number, but the normalization factors are quite different. Then, what is the normalization rule for a general finite difference filter?
Relevant answer
Answer
See page 24, Chapter 3 on Convolutions. Another path for understanding your filter is to see them as wavelets. They are a version of a Haar wavelet. Normalization is the same.
  • asked a question related to Finite Difference
Question
4 answers
Hi, my name is Christopher and I'm currently doing a research in solving the linear elasticity equations using finite difference scheme as a part of my undergraduate thesis. I have been able to solve for the static linear elasticity (displacement formulation) using the finite difference scheme. However, I'm unable to solve the dynamic linear elasticity (velocity-stress formulation) equations using finite difference (Central Time and Central Space FD). The solution always diverges with time.
Here are the first order hyperbolic governing equation i used:
(∂V_x)/∂t=1/ρ ((∂σ_xx)/∂x+(∂σ_xy)/∂y)
(∂V_y)/∂t=1/ρ ((∂σ_yy)/∂y+(∂σ_xy)/∂x)
(∂σ_xx)/∂t=(λ+2μ) (∂V_x)/∂x+λ (∂V_y)/∂y
(∂σ_yy)/∂t=(λ+2μ) (∂V_y)/∂y+λ (∂V_x)/∂x
(∂σ_xy)/∂t=μ((∂V_x)/∂y+(∂V_y)/∂x)
Central Time Central Space FD scheme:
∂f/∂t=(f^(n+1)-f^(n-1))/2∆t
∂f/∂x=(f_(i+1)^n-f_(i-1)^n)/2∆x
The domain i'm trying to simulate is a 2D cantilever beam with fixed displacement on one end and shear stress on the other end. The rest is traction free boundary.
Relevant answer
Answer
A good choice here would be use of staggered grid. You can associate different quantities with different grid elements, e.g. diagonal stress components go at cell centers, off-diagonal stress components go at vertices, and velocity components go to cell edges (Vy sits at horizontal edges and so on). This way you'll have, for example, dVx/dx approximated at a cell center, exactly where sigma_xx is attached.
  • asked a question related to Finite Difference
Question
8 answers
As you know Finite difference representations of derivatives are based on Taylor’s series expansions. I'm wondering that is it available to use the Fourier series instead of Taylor series expansion. I'm not sure but I guess it could be a more precise modification for FD method.
Share your ideas, please.
Relevant answer
Answer
This is perhaps too general a question and it certainly doesn't have enough information to give a comprehensive answer. You haven't mentioned if you are solving an ODE or a PDE, if it steady or unsteady in time, what the boundary conditions, Cartesian or polar coordinates, and so on. So I'll make some observations in teh light of some of the thigs that I have been looking at recently.
I am not a all sure that one can formally compare rates of convergence because one isn't comparing like with like. A second order accurate finite difference method has an error which is proportional to h^2, i.e. quadratic convergence. The speed of convergence of a Fourier series depends on the degree of continuity of the function being approximated, and therefore one looks at the power of n in the denominator. Perhaps it would be better to consider how quickly one can evaluate an approximation to one's target function to, say, a relative accuracy of 10^{-6}.
If one is trying to compare the speeds of computation of the steady-state solution of a nonlinear PDE for a given accuracy, then there are many issues to consider. It is much quicker to write a code to employ finite differences to a nonlinear system than it is to write what is in effect a spectral solver. Part of this is due to the multiple interaction of the sinusoids leading, occasionally to triple or even quadruple summations. Such summations require extensive checking and careful coding. Perhaps all of this work may be justified if the resulting code is going to be used very many times. On the other hand, if one requires only a few solutions, then I would use a simple finite difference scheme. It's a bit like the vexed old question of, which is better, a mountain bike or a road bike. The answer depends on what you want to achieve.
As a generalisation, I would imagine that Fourier series solutions will be very quick compared with finite difference solutions, whereas they are likely to be much slower for nonlinear equations.
I guess that the best comparison between the methods themselves but with no account being taken of code creation time will be by means of an operation count for the various methods. Then, the number of iterations required to obtain solutions with a maximum error of 10^{-3], 10^{-4}, 10^{-5} and so on may be used show the variation of the time taken against the error.
  • asked a question related to Finite Difference
Question
9 answers
I am reading this article to understand Richardson's extrapolation for NSFD. With MATLAB, I did the simulations and got the same result with the step size they used. But when I increase the step size, I will get negative results in the Richardson Extrapolation (I have used the Aitken-Neville algorithm). What is the problem? Is it the formula used? Or the code that I have used? that result in negative values.
Thank you!
Relevant answer
Answer
Hi!
To be honest, I have no idea why you have these issues. Does your method have a formal order of accuracy? If it doesn't, then Richardson's Extrapolation won't do anything. Is your set of equations a stiff set? If so, then explicit methods can and will diverge irrespective of their order of accuracy. Direct methods, where the ODEs are converted into a matrix/vector system will often yield good solutions. Even if they are nonlinear, then a Newton-Raphson approach can work well.
  • asked a question related to Finite Difference
Question
5 answers
Staggered grid finite-difference (FD) methods are widely used for elastic wave equation modelling because of their high computational efficiency, smaller memory requirement and easy implementation. I am looking for the mathematical foundation for higher order (8th) of finite difference staggered-grid method on 2D P-SV elastic wave propagation.
Relevant answer
Answer
Dear Dr.
Ijaz Durrani
,
Thank you for suggesting me this article to me. I will read it.
  • asked a question related to Finite Difference
Question
8 answers
Does anyone have a reference of finite difference equations for low salinity simulation? or any help how to include the salinity TDS in the finite difference equations.
Thanks in advance
Relevant answer
Answer
  • asked a question related to Finite Difference
Question
8 answers
I am trying simulate an infinite domain so I need to use non-reflective boundary conditions. While searching, I came across PML method, but I have certain doubts.
1) How to decide the dimensions of the PML layer?
2) What effect does PML mesh size have on the reflected waves?
I am using TNO DIANA and I simulated a block of soil of 50 m subjected to an impulse load and tried to see the wave travel. I used PML lengths of 10 to 50 m . However, I can still see waves reflecting back. I also tried to increase the function values assigned at the PML boundaries, but after one point I see that the PML behaves like a clamped or fixed boundary. Can someone point me to a source where PML is explained clearly?
Thank you very much.
Relevant answer
Answer
Dear Nischal Sehrawat, The PML mathematical implementation consists of the introduction of a modified coordinate system, where an expansion coefficient is a complex number with an evanescent imaginary part. This generalization is achieved through the substitution provided in the screenshot:
  • asked a question related to Finite Difference
Question
25 answers
In recent years, many new heuristic algorithms are proposed in the community. However, it seems that they are already following a similar concept and they have similar benefits and drawbacks. Also, for large scale problems, with higher computational cost (real-world problems), it would be inefficient to use an evolutionary algorithm. These algorithms present different designs in single runs. So they look to be unreliable. Besides, heuristics have no mathematical background.
I think that the hybridization of mathematical algorithms and heuristics will help to handle real-world problems. They may be effective in cases in which the analytical gradient is unavailable and the finite difference is the only way to take the gradients (the gradient information may contain noise due to simulation error). So we can benefit from gradient information, while having a global search in the design domain.
There are some hybrid papers in the state-of-the-art. However, some people think that hybridization is the loss of the benefits of both methods. What do you think? Can it be beneficial? Should we improve heuristics with mathematics?
Relevant answer
Answer
I am surprised that a known scholar with a long experience in the transportation domain maintains such a hard stance on heuristic search. Obviously, we live in a world where extreme opinions are those which are the most echoed. Truth is, assuming that all practical optimization problems can be solved to optimality (or with approximation guarantees) is essentially wishful thinking. Given this state of art, better integration of exact and heuristic algorithms can largely benefit the research community. At the risk of repeating myself, here are some important remarks to consider:
• CPLEX and Gurobi (the current state of the art solvers for mixed integer programming optimization) rely on an army of internal heuristics for cut selection, branching, diving, polishing, etc... Without these heuristic components, optimal solutions could not be found for many problems of interest. CPLEX has even recently made a new release permitting a stronger heuristic emphasis (https://community.ibm.com/community/user/datascience/blogs/xavier-nodet1/2020/11/23/better-solutions-earlier-with-cplex-201). MIP solvers also heavily depend on the availability of good (heuristic) initial solutions to perform well. For many problems, cut separation is also done with heuristics. In the vehicle routing domain, we have a saying: heuristics are the methods that find the solutions, exact methods are those that finally permit to confirm that the heuristics were right (sometimes many decades later, and only for relatively small problems with a few hundred nodes despite over 60 years of research on mathematical models)...
• The machine learning domain is quickly taking over many applications that were previously done with optimization. Among the most popular methods, deep learning applies a form of stochastic gradient descent and does not guarantee convergence to optimal parameters. Neural networks currently face the same scrutiny and issues as the heuristic community, but progress in this area has still brought many notable breakthroughs. Decision-tree construction and random forests are also largely based on greedy algorithms, same for K-means (local improvement method) and many other popular learning algorithms.
• Even parameter tuning by the way is heuristic... I'm sorry to say that, but most design choices, even in the scientific domain, are heuristic and only qualify as good options through experimentation.
  • asked a question related to Finite Difference
Question
11 answers
I solved a nonlinear PDE by linearization and using finite difference and spectral methods. the errors for simple u_exact= exp(-t)(-8x^2-8y^2+7/2) don't change when the meshes become finer, in other word the error for all spatial meshes (20, 40, 60,...) is equal approximately, but for a more complex example u_exact=exp(-t)sin(x)cos(y) the results are very good and order of convergence is correct(i.e. order=2).
can anyone pleas tell me the reason of this trouble that happens in test whit a simple u_exacts?
Relevant answer
Answer
thanks for your help.
I understood the reason of this trouble. there was a tiny mistake in my Implementation.
  • asked a question related to Finite Difference
Question
3 answers
I have a nonlinear cable dynamic model as follows,
m[(∂u/∂t)-(∂ϕ/∂t v)]=-0.5 ρ_a dπCDt u|u|(1+ε)+(∂T/∂s)-wc sin⁡ϕ
m(∂v/∂t+∂ϕ/∂t u)=-0.5 ρ_a dπCDn v|v|(1+ε)+T (∂ϕ/∂s)-wc cos⁡ϕ
It involves both space and time derivatives. Finite difference scheme is used to discretize the partial differential equation as shown in figure 1.
where k is the time and j is the space. Since there are multiple unknown values (k+1 terms) are there, direct matrix inversion is not possible. It is found that Newton Raphson method can be used to solve such equations.
How to solve such an equation using Matlab?
Relevant answer
Answer
I don't know this specific physical problem but you have to be aware of the mathematical character of this system of partial differential equations. Try to see from the matrix form if the eigenvalues problem admits real solutions and the system is hyperbolic. That will define the type of BCs and the numerical discretization.
Hint: The second compatibility equation can be substituted directly in the first two equations so that you have only time derivatives of u and v.
  • asked a question related to Finite Difference
Question
4 answers
Suppose we have an equation like this: du/dx=dv/dy (d/dy partial derivatives)
can we discretize du/dx using a central difference scheme with 2nd order accuracy and dv/dy using forward difference with fourth-order accuracy?
Can anyone suggest me some papers on this?
Relevant answer
Answer
This has also been studied extensively and you can find articles on the Web discussing it. The fact that the momentum equation (i.e., Navier-Stokes) is second order and the continuity equation is first order but must both be solved simultaneously gives rise to some interesting effects and computational challenges. The implementation you're suggesting has been tested and found to be problematic. If you search for "checkerboard" and "pressure" you will find many discussions on this subject. I have covered this and similar problems in several publications including, open channel flow using implicit, explicit, and hybrid differences compared to the MacCormack method, which came out of aerospace work. If your truncation errors are of different magnitude, you will get unwanted artifacts in the solution.
  • asked a question related to Finite Difference
Question
3 answers
I have seen several papers on SPH discretization of the shallow water equations and its application to flood and other hydraulic modeling. However, no paper I have read addresses why it is attractive to use SPH for SWE rather than a Finite Volume or Finite Difference approach. FV and FD can use non uniform grids and SPH is only beginning to address that. So am I missing any advantage of SPH in this regard?
Relevant answer
Answer
The reason is very intuitive: SPH captures free surface in a natural way due to its fundamentals (Lagrangian method).
Two main problem in Shallow water wave solvers are a) wet-dry algorithm in domain boundary and b) free surface fluctuations. Those are handled perfectly with SPH method. For example problem of DAM break which is highly nonlinear can tackle very nice by SPH
BTW: There are two down side to SPH: Computationally Expensive and measures of turbulence and bed shear are not readily come out of your model like classic CFD solvers.
  • asked a question related to Finite Difference
Question
8 answers
For example: Lu+0.5u=f(x,y)
or Lu-au=o (elliptic PDE).
Actually I am looking some PDE for which I should get a singular system after applying any finite difference scheme.
Relevant answer
Answer
Dear;
For produce singular system you use eigenvalue and with Dirichlet’s or Neumann’s boundary conditions will .
Regards
  • asked a question related to Finite Difference
Question
9 answers
Hello,
My question is concerning the implementation of a parallel-plate waveguide (PPW) using 2D FDFD. I am using the total-field/scattered field method in the paper attached by Rumpf. One way to implement the PPW is to define two PEC objects (by modifying the epsilon matrix on the grid) and specify the total-field between the two objects using the Q matrix to excite the right modes. Is there a way to implement this where the PECs are defined as surfaces or boundary conditions instead of objects?
Relevant answer
Answer
I think the method depends on how you are using the waveguide and what you want to learn. Do you want to calculate the modes that this waveguide would support? If so, the link pointed out by Ahmed is perfect. However, that is a rigorous analysis. If the PPW is to be used as a microwave transmission line, it may be perfectly valid to analyze it using an electrostatic approximation. Under Topic 10 at the following link I provide a MATLAB function tlcalc() to analyze many different types of transmission lines.
You might also want to simulate waveguide circuits and look at different waveguide discontinuities. This is actually a large 3D problem. Consider using finite-element or finite-difference time-domain. Here are some links to start learning FDTD:
Hope this helps!!
  • asked a question related to Finite Difference
Question
5 answers
In the paper "Magnetometer-Only Attitude Determination Using
Novel Two-Step Kalman Filter Approach" in equation 19 do I need to complete quaternion multiplication first and then do simple mathematical finite differencing or it is in other way?
Relevant answer
Answer
Hi,
In fact the matrix H is not explicit in equation (19), it is present in the equation giving the estimate and the covariance which are then updated using equations (5).
Best regards
  • asked a question related to Finite Difference
Question
6 answers
I am going to solve Richards equation for unsaturated zone using finite difference method. I read in several papers that van Genuchten method is used to estimate hydraulic properties. In van Genuchten formula we can estimate theta and K. what is the difference between the theta  obtained by van Genuchten formula and the theta  obtained by Richards equation. The other question is that in solving Richards equation we assume an initial h. in the next step h should be estimated so that we can calculate  using this equation. How it can be updated in each step.
Relevant answer
Answer
Shahriar Shahrokhabadi y Zoubair Boulahia , Vahid Moosavi necesito una ayuda en mi simulación por "Simulink" la ecuación de richards ,
  • asked a question related to Finite Difference
Question
15 answers
I need to multiply the inverse of a matrix A to another matrix B. If B were to be a vector, I would simply solve a linear system Ax = B to get the product x=inv(A)B. With B being a matrix, I don't know the most efficient way|method to compute inv(A)B.
Kindly share your experience.
Relevant answer
Answer
As your system matrix most probably is sparse, you might be better off with numerical linear algebra routines especially designed for large, sparse matrices. I did stuff on that in the late 80s, through the Cray-2 machine, but there must be more streamlined ways to do it nowadays. (In those days one had to "cut" the lengths of the vectors in order to match the smartest size of sub-vectors for the linear algebra routines, but nowadays that will most surely be automatic, to a degree, nowadays.) Talk with numerical linear algebra experts, and they will help you.
  • asked a question related to Finite Difference
Question
7 answers
Consider solving the nonlinear Schrödinger equation (NLSE) with 2D transverse dimensions. Or more simply, consider the beam propagation method (BPM).
We know that the original formulations of Feit&Fleck relied on the FFT to compute the derivatives.
In the 90s, many works about finite differences (FD) were proposed. The advantage is that the grid is more flexible and the boundary conditions are better understood and controllable (PML, TBC...). Prof. Fibich in his book suggests FD is a better approach to tackle collapses.
With the advent of GPU, FFTs with lots of points seem to be almost costless. Do you think it is not worth anymore to study finite differences? What about non-paraxial propagators?
Thank you for your suggestions.
Relevant answer
Answer
The accuracy of the numerical results are mainly restricted to accuracy of the models, although sometimes the numerical stablilization might due to the detalied numerical methods. GPU might be treated as one possible way to decrease the CPU times in numerical simulations. Further, for a detaield numerical simulation problem, BC might be very important.
  • asked a question related to Finite Difference
Question
4 answers
Hello,
I am doing a series of metal forming simulations in Abaqus. I want the simulations to automatically stop when a critical value of PEEQ (or some other variable) has been reached, in order to indicate the failure of the material.
Please see the attached figure, there is a necking region which is highly unrealistic, in reality, the material would have failed much before this.
Could someone please tell me how I can set Abaqus to stop the simulation once a user-specified failure criteria has been met?
Many thanks,
Hamid
Relevant answer
Answer
Basically, there are at least three methods to perform such task. The problem is that most of them works only for Explicit anylysis. Below is a brief description of them all.
1) Using *FILTER "to stop the analysis when the value of any variable in the output request reaches a specified upper bound or lower bound".
Works ONLY with Explicit analysis.
For more information read this:
2) Using *EXTREME VALUE with *EXTREME ELEMENT VALUE "to stop the analysis at the first occurrence of a variable exceeding its user-specifed bound"
Works ONLY with Explicit analysis.
For more information read this:
3) Using utility routine XIT "within any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to terminate an analysis."
You need to include this command in some user subroutine which would check the PEEQ value, and if it reach some extream value, run the command XIT. I would recommend to use USDFLD subroutine with utility routine GETVRM for Abaqus/Standard.
For more information read this:
Hope this information will help you.
Sincerely,
Pavlo
  • asked a question related to Finite Difference
Question
15 answers
The finite difference method with Taylor expansion give a good accuracy higher order derivative of normal functions for which the expansion coefficients can be found following this link: https://en.wikipedia.org/wiki/Finite_difference_coefficient
My question is what would be the higher order expansion of the functional derivative knowing that it has a similar Taylor expansion. Please note that I'm talking about the numerical differentiation.
Relevant answer
Answer
Thank you for the clarification, however I'm a bit not very sure of whether to choose F(f + 2h𝜂) or F(f + h𝜂1 + h𝜂2) in analogy to f(i+2) (for normal functions).
  • asked a question related to Finite Difference
Question
2 answers
Hi all,
I am attempting to implement 3D finite difference (FD) beam propagation method (BPM) based on alternate-direction implicit (ADI) method.
Does anybody know about how to implement or the formulation of transparent boundary condition (TBC) in 3D FD-BPM based on two step ADI method?
Any suggestions or advice would be appreciated,
Thank you!
Relevant answer
Answer
Dear Onur,
I am also trying to solve the waveguide propagation problem using x,y, and z co-ordinates using FDBPM. Could you please share your matlab code which might serve as a starting point for me.
Thanks in advance.
  • asked a question related to Finite Difference
Question
4 answers
Dear all, I have a question about implementing finite difference scheme to two related grids (one is the original non-uniform grid, for example grids are clustered near the wall regions when simulating wall turbulence. And the another one is the uniform grid transformed from the original non-uniform grid)
Finite difference scheme can work on both grids. On non-uniform grid, finite difference scheme could be derived from Taylor expansion of non-equidistant points. And on the transformed uniform grid, we can use the difference scheme in the original equidistant situation, just multiply by a transform coefficient.
My question is are these two methods equivalent? Consider a second order central difference scheme for first derivative, we use three points when using a non-uniform grid (to obtain the derivative at i point, we need values at i-1, i, i+1). However we use only two points when using the transformed uniform grid (to obtain the derivative at i point, we need values at i-1, i+1).
Did we lose some information when we did the grid transformation?
Relevant answer
Answer
Recommended
  • asked a question related to Finite Difference
Question
8 answers
I'm trying to implement an incompressible fluid solver with a CIP advection scheme, or to be more specific the USCIP scheme from this paper:
It seems to require colocated velocity components instead of a staggered placement.
My question is what is a suitable FDM scheme for solving the Poisson equation for pressure projection? Unfortunately the paper does not say.
Which stencil for the divergence and Laplace operator would be a good choice for this situation?
Relevant answer
Answer
personally I never used the CIP method and I don't like the semi-Lagrangian approaches at all. But the historical MAC method by Harlow & Welch (I attached) used a particle time-advancing method that is then re-located on an Eulerian staggered grid. In general, the projection step does not depend on the discretization of the convective term but has a source term containing the divergence of the intermediate velocity you redistribute on the staggered grid.
The compact stencil for the pressure (central second order discretiziation of Div Grad operator) ensures you have no spurious modes that, conversely, appear on a large stencil. If you consider my papers (but there is also a section in the textbook of Ferziger and Peric) , you will find that the compact stencil for the pressure is the same you can use in the Exact projection method on staggered grid and in the Approximate projection method on colocated grid. The difference is in the resulting Div v residual.
I suggest starting from the general idea of using the interpolation as described in the paper by Harlow.
  • asked a question related to Finite Difference
Question
28 answers
In order to solve a time-depended PDE which method is better to use Forward or Backward Euler method,especially when we are talking about small time steps?Which of this methods are more stable?
Relevant answer
Answer
Roughly, numerical stability is to do with how well the numerical solution matches the exact solution, i.e. whether the error grows or not. So the Backward Euler method is a stable method when solving a linear equation such as Fourier's equation. However, if the equation being solved is nonlinear, then iterations are required when applying Backward Euler, and these iterations may diverge if the timestep is too large.
  • asked a question related to Finite Difference
Question
3 answers
Does anybody have experience with the Finite Difference Element Method described in http://www.scc.kit.edu/scc/docs/FDEM/Literatur/FDEM-Survey-Feb09.pdf and would advocate for or against using it? The method works on an unstructured grid, the field quantities are represented by their values at the grid points, and spatial derivatives are evaluated at the grid points by means of fitting polynomials into the gridpoints in the neightborhood of the respective gridpoint.
To me, at first sight, the method seems to have a couple of advantages, compared to FEM:
- The meaning of the state variables of the discretized system is intuitive
- It can be applied as a "black box" to virtually every PDE
- There is no a priori pen and paper work necessary for calculating weak forms, quadrature formulas etc.
- It can readily be extanded to rather high orders
- The PDE can contain arbitrarily high derivatives, in principle
- The error of the derivatives can be estimated
Does anyone know any drawbacks of the method?
Relevant answer
Answer
Finite element method (FEM) is a powerful and popular numerical method on solving partial differential equations (PDEs), with flexibility in dealing with complex geometric domains and various boundary conditions. So it has a wide range of applications in Mechanical Engineering, Thermal and Fluid flows, Electromagnetic, Biomathematics, Geo Mechanics, etc.
Please refer the attachments for FEM
  • asked a question related to Finite Difference
Question
1 answer
The Damping term ( bottom left ) is the 4th derivative of the field that is to be solved 'm'. The Error Term I have in the plot ( top right ) is a 3rd derivative term from my finite difference approximation. It can clearly be seen that the error in my m-equation ( bottom right ) is primarily due to the growing oscillatory error term.
Relevant answer
Answer
Reducing oscilltory vibration in any system by damping must result in a total loss of energy. Any effect that contributs to this effect is not damping.
  • asked a question related to Finite Difference
Question
4 answers
It known that the common sources of error in finite differences are round-off error and computer rounding, I am focusing here on using finite differences to numerically evaluate the derivative of a function, sometimes whether we use finite differences or exact analytical expression the results are very close.
My question: Is there special cases when the finite difference approximation fails?
Relevant answer
Answer
I think that the error can be reduced when using finite difference approach to solve differential equations by increasing the number of cells in the domain ,for example calculation of potential distribution by solving Poisson's equation .
  • asked a question related to Finite Difference
Question
3 answers
I need to calculate the curvature of a boundary of FE model. I have the current coordinates of nodes of boundary. I used the formula of curvature with finite difference, but i gives noise in the curvature. I also used quadratic polynomial fitting through three points at a time but it also give noisy curvature.
  • asked a question related to Finite Difference
Question
6 answers
Hello everybody,
I am trying to solve a differential equation in spherical coordinates to obtain the thermal stress caused from the thermal expansion of the considered body. Since there is the spherical symmetry, the equation depends only on the radial coordinate r (see the attached file for details).
In the case of a general thermal profile, I get unphysical spatial oscillations in the solution (see the attached file for details).
Could you kindly indicate me if there is a way to avoid this unphysical effect?
Thank you very much for your help.
Best Regards.
Marco Gandolfi
Relevant answer
Answer
Here it is
J. C. Tannehill, D. A. Anderson and R. H. Pletcher, “Computational Fluid Mechanics and Heat Transfer,” 2nd Edition, Taylor & Francis Ltd., Oxfordshire, 1997.
  • asked a question related to Finite Difference
Question
21 answers
Which is the latest method to solve non linear equation using finite difference method.
Can you tell me some methods for solving non linear equations using finite difference method.
Relevant answer
Answer
Primitive variables, streamfunction/vorticity or velocity potential? Laminar/turbulent? Steady/unsteady?
All of this could have been stated in the original question!
Doesn't ADI give you good performance? It is fairly easy. You could use multigrid, which can be very fast but it isn't easy. Why do you wish to go for an easy method?
  • asked a question related to Finite Difference
Question
2 answers
Hi All,
This is the first time posting here asking a question. I am trying to reproduce the result from this paper. My main area of interest is applying this to Black Scholes. The author has a subsequent paper that does that. However, I still do not understand the mathematics that is done to arrive at the results. I have posted questions to the author but I have not got any response. Here are my questions.
The paper essentially uses Moment matching to arrive at optimal coefficients for the finite difference discretization. I was able to get through the zeroth moment and first moment. I am attaching my attempt at deriving the results of the paper. Things I am having an issue with.
1. The Imaginary part in the paper for R, has a negative sign that I do not have.
2. The higher order terms, I am not sure how the paper arrived at the results. Any clues, hints or other forms of assistance is much appreciated.
Thanks in Advance. I have attached my attempt at the results as a PDF.
Relevant answer
Answer
You must also achieve stability. One way to both require stability and accuracy is by solving feasibility in a constrained linear program: for example, see section 2.2 in
Alternatively, use a framework that has some assurance that the discretisation has the same stability as the original PDE, especially when that framework and assurance also applies to nonlinear PDEs. See one approach in
especially Section 3 that addresses advection-diffusion, and another cognate approach in
  • asked a question related to Finite Difference
Question
4 answers
Despite the higher accuracy of Finite analytic method than Finite difference and Finite element methods, why is it not popular as the other methods ?
Relevant answer
Answer
The choice of method depends on the desired accuracy, as well as, concerns about the stability and robustness of the system while maintaining computational efficiency and universality. As rightly pointed out by Butusov, sometimes versatility, convenience and elaboration of method mean more, than precision. Finite analytic method possesses several additional restrictions that limit its wide applications and universality.
  • asked a question related to Finite Difference
Question
44 answers
Yes, there is a new method which is called Piecewise Analytic Method (PAM). It does more than Runge-Kutta.
1. PAM gives a general analytic formula that can be used in differentiation and integration.
2. PAM can solve highly non-linear differential equation.
3. The accuracy and error can be controlled according to our needs very easily.
4. PAM can solve problems which other famous techniques can’t solve.
5. In some cases, PAM gives the exact solution.
6. ....
You can see :
Also, You can write your comments and follow the update of PAM in the discussion
Relevant answer
Answer
I stopped working in this field nearly 20 years ago. But even than there existed several methods that outperformed RK4 by lengths, the comparison is done on the estimated accuracy obtained by the same number of calls to the ODE's right hand side function. Have a look in the following books
Hairer, E. and Nørsett, S. P. and Wanner, G.: Solving Ordinary Differential Equations, Part I - Nonstiff Problems, Springer Verlag, 1987.
Hairer, E. and Wanner, G.: Solving Ordinary Differential Equations, Part II - Stiff and Differential-Algebraic Problems, Springer Verlag, 1991.
There the methods (for non-stiff ODE) of Dormand/Prince are highly recommended (I used one in my time). Somewhere in the middle of the first book is a twosided graphics where the orbits of a specific problem are shown obtained by different methods (and the same maximum number of rhs calls). The orbits of the chosen ODE are known from theory to return to the starting point. The impressive fact of the graphics is to show how good this feature is reproduced by the methods applied: the orbit of 1-step Euler metod leaves the pages and does not return, the orbit of the RK4 method leaves a large gap between start and end points, the orbit of the DP method without stepsize control leaves a small gap, and the orbit of DP with stepsize control leaves no visible gap; even more, the last method needed much less rhs calls!
This was state of the art 20 years ago. Maybe that meanwhile better methods have been developed, maybe the initially discussed PAM is one. Anyway, I recommend that you replace the RK4 method in your code at least by the DP4/5 method. If you use Mathlab then apply ode45 as ODE solver, if your code is in Fortran or C then search the internet for DOPRI5.
  • asked a question related to Finite Difference
Question
2 answers
I am working on a a finite difference model of a simplex atomizer. The crux of the problem I’m having is existence of a conical geometry converging at the orifice. I need to take advantage of axisymmetry to keep the computational time and memory requirements to a minimum. I was working in cylindrical coordinates and making progress until I realized that the geometry was causing considerable skewness in the nodal positions. I can handle this with Cartesian coordinates but then I have no way to approximate the angular velocity (normal to the solution plane) which was straightforward in cylindrical coordinates. Can anyone suggest a method to compute normal (tangentilal velocities?
Relevant answer
Answer
Hussein ... thanks ... I'll check it out.
  • asked a question related to Finite Difference
Question
7 answers
In FE some elements are overlapping. I read a paper says thst such overlapping causes higher in plane stiffness only. I wonder does the impact on accuracy of solutions very big?
Relevant answer
Answer
In my opinion, overlapping elements can dramatically change the accuracy of the results. Mesh distribution has to be as much as regular to obtain accurate results.
  • asked a question related to Finite Difference
Question
5 answers
When using Return Mapping algorithm, I implement Newton–Raphson iteration to reach the value of plastic multiplier. I know that the total value of plastic multiplier should not be negative. But, what should I do if one increment of plastic multiplier in an iteration is negative. Should I stop iteration or continue or what?
Relevant answer
Dear Megahed.
Let me introduce first. I work about 14 y with plastic zone analysis of plane framed structures. My software PPLANAV run based on NR, which mean solve some very simple problems, like columns, beams and portals.
After all this time, I didn't worked with bigger structures because of time consummed processing, which becomes higher when you have many numerical data involved and many NR iteration too.
Saying this, I may ask you how numerically the computer arrived to this negative number? I guess that you must check it precisely, to guarantee that there is no mistake in your matrices, in the answers produced first. Therefore, it recommends to slow down and analyze.
How the computer program produced this answer? There is a possibility of any kind of buckling is involved or coupled? It is there any numerical bug? It is some interdependency between the tensors that lead to an negative value?
Actually, in a case of a simple supported steel beam with a single vertical load at the mid-length, after the plasticity has formed a potential zone where will be the collapse, but there is some little elastic part yet, hundreds of iterations happen till reach the end. Making a plot of its deformed shape, between two consecutive iterations, you will see it like a string, downward and upward. Therefore, the iterations of NR, trying to null the residual force vector, make this change of direction because the structure is very sensible at this time.
So, you must certify yourself that the unstability phenomena or the resistance limit are occurring at that point, that there is a sound explanation for this numerical correction. If this is the case, everything is fine. Otherwise, look to your code and search if there is no other thing producing the unespected answer.
Good luck.
  • asked a question related to Finite Difference
Question
26 answers
I am wondering the capabilities of 2nd order finite difference formula in space and first order formula in time to discretize the vorticity-streamfunction equation to solve Taylor Green Vortex Problem. I am mostly concerned about capturing the vortex interaction using these formulas. Do I need to use high order finite difference schemes both in space and time to capture vortex interaction?
Relevant answer
Answer
Hi Mahdi, I saw that professor Tapan and Denaro answered the question. Who am I to disagree with them? Nevertheless, I will my two cents. If I am mistaken, please correct me because I am willing to learn.
There is nothing preventing you from getting such interaction with low order schemes. At least theoretically, you can demonstrate that all schemes tend to the same solution as dt and dx decrease. At the end of the day, this is what Roache's work is based on! You can converge to the same solution faster with a high order scheme. For example, refer to the Taylor Expansion series. The thing is the fidelity of your solution. In addition, after a brief literature review, you will see that most of the current research is carried out using High order schemes. Here is the catch, a second order scheme can be more ACCURATE than a 6th or 7th order scheme. For example, refer to the DRP.
Having said that, you can obtain your interaction using first order in time and space, but the temporal and spatial discretization will be extremely small. For example, if your Re_cell = 1 ( I would say < 1) You round off and discretization error will be smaller than your cutoff (Nyquist). However, to obtain such resolution, provided that you are reproducing professor's Tapan's paper, the mesh will be huge. Here is the point I want to make: You can obtain your interaction, but your solution will not be accurate. I am not surprised at all, and Professor Tapan gave a pristine answer for that.
  • asked a question related to Finite Difference
Question
4 answers
I tried to code this method and it diverges when the stiffness approach zero. As, calculating load vector coefficient ∆λ requires having inverse of the stiffness as shown in the attached photo (https://scholar.harvard.edu/files/vasios/files/ArcLength.pdf) .So do anyone have a solution to it
Relevant answer
Answer
There are multiple versions of Arc Length Method. I think the Cylindrical version could help you. Please have a look at the following reference:
A Unified Library of Nonlinear Solution Schemes by Sofie E. Leon, Glaucio H. Paulino, Anderson Pereira, Ivan F. M. Menezes, and Eduardo N. Lages
  • asked a question related to Finite Difference
Question
5 answers
I know about mesh density, skewness, wrap angles, and aspect ratio.
Per literature, aspect ratio is a quick tool to define quality of mesh.
Is there a rule of thumb for acceptable values of elements aspect ratio?
Relevant answer
Answer
in ansys workbench for static analysis, ERROR response show the released energy between proximity elements, so if your error response is minimum, your mesh, so your mesh quality is good and then your other response have accuracy
  • asked a question related to Finite Difference
Question
2 answers
How different micro textures could be modeled on the tool model in ABAQUS ?
When modelling micro textures can the tool be kept rigid ?
(If it can't be kept rigid, can the tool be modeled as deformable ).
Relevant answer
Answer
You can make any geometry rigid in Abaqus.
It will be easier to model the tool in Solidworks,
or for much more detail and control I suggest Z Brush.
(But importing z brush model into Abaqus may be a little hard.)
And also you have to use lots of small elements on both rigid and deformable parts to keep the details.
  • asked a question related to Finite Difference
Question
1 answer
I have developed a honeycomb sandwiched structure in Salome platform, meshed with netgen 2D, then calculated the compression stresses on it using Calculix open source FE.
I tried to optimise the element offset in order to eliminate such problem.
Attached is the photo of the honeycomb core.
Relevant answer
Answer
by digraph
  • asked a question related to Finite Difference
Question
4 answers
Can anyone suggest material regarding Von Neuman stability for fractional finite difference techniques?
Relevant answer
Answer
Thanks Dr. Yoisell Rodrguez
  • asked a question related to Finite Difference
Question
7 answers
Hi everybody
In discretization process of one PDE, can I use FW, BW and central FD approximation simultaneously? for example for one derivative I use BW approximation and for the other one I use FW?
(df/dx)_m,n= FW
(df/dy)_m,n=BW
Thanks.
Relevant answer
Answer
The correct answer depends on some factors:
1) the mathematical character of the PDE. Elliptic equations have no specific direction of propagation and central FD should be used). Conversely, hyperbolic equations have specific characteristic directions and forward/backward derivatives are often used according to these directions.
2) Numerical stability properties. Sometimes forward/backward derivatives are used also to stabilize the numerical solution, preventing oscillations that can onset the numerical instability.
Often, a time-dependent PDE problem can be discretized using several stencils, that happens particularly close to the boundaries where non-symmetric stencils must be used.
  • asked a question related to Finite Difference
Question
75 answers
In many problems such as solving PDEs or optimization problems we need to calculate the numerical approximation for differentiation operation, nowadays in some packages such as Tensorflow the automatic differentiation is available, I want to know which one is more accurate, numerical differentiation methods such as finite difference or automatic differentiation?
Relevant answer
Answer
DN-differentiation does not have truncation errors. It is an exact differentiation method. It can be interpreted as some kind of automatic differentiation, because you "hide" the derivatives of elementary functions in the dual part of the number.
Please check out some work I made with my students to see more details about it.
As Richard Epenoy said, complex-step directly gives you an O(h^2) error with one single (complex) evaluation of the function.
I also attached Vincenzo's Master thesis. You can see some tests we did about several differentiation techniques there.
  • asked a question related to Finite Difference
Question
5 answers
I have a set of coupled ODEs:
J = mu*e*n(x)*E(x) + mu*K*T0* dn(x)/dx
and
dE(x)/dx = (e/eps)*[N_D(x) - n(x)]
These are the drift diffusion equation and Gauss's law for a unipolar N+ N N+ device. The doping profile N_D(x), the mobility mu, T0 are known. The DC current, J, is also known, as are the boundary values: n(0) = N+, N(L) = N+. I want to self consistently solve the above two equations using finite differences, but I am unsure how to go about doing so.
Thanks in advance!
Relevant answer
Answer
Hello,
I have written simple 1D drift-diffusion solver examples using finite difference and Scharfetter-Gummel discretization which you can find here:
I'm happy to answer any questions.
  • asked a question related to Finite Difference
Question
3 answers
FEM or finite difference ?  Thanks all, Si
Relevant answer
Answer
Following..
  • asked a question related to Finite Difference
Question
6 answers
Different people have different biological properties like DNA ,finger prints, iris and so on.
We’re looking for a mechanism that can identify people according to their cerebral frequencies and nervous system.
Is it possible to recognize these differences?
And do you know about unique parameters of the brain frequencies?
Have you ever read something about it?
Relevant answer
Answer
I am not a person in this field, but I guess this could be a very good criteria for the person identification together with other established parameters. There are several waves which individually or and in combination should be used as a candidate to evaluate and set up as a benchmark for your aim.
  • asked a question related to Finite Difference
Question
4 answers
I am actually simulating 1D Fick's second diffusion law in steels, quantitatively. I am using a grid spacing of 1 Å for better resolution, though the inter-atomic distance in steels is around 2.8 Å. The other parameters are also converted to Å scale. I presume the concentration term is a field here without any physical significance. Can I proceed with this assumption of finer grid spacing? Also I would appreciate any information regarding the understanding of concentration profile in 1D, compared with the actual 3D case with references.
Thank you.
Relevant answer
Answer
Ok, it wasn't clear from the original question. I shall take a closer look at Cahn-Hilliard equation. Regards
  • asked a question related to Finite Difference
Question
12 answers
when we need to solve the Fokker Planck equation (Kolmogorov Forward equation) with finite difference, we need to solve it in a bounded domain, (regardless of the dimension of the FPE), for more accurate solution, which kinds of boundary condition should be considered?
1-Natural boundary condition:
which is a Dirichlet type boundary condition
the value of probability at the boundaries equal to zero
2-the Reflecting boundary condition:
which I think is the Robin type boundary condition
and the Flux at boundaries is zero?
  • asked a question related to Finite Difference
Question
4 answers
I have the following problem:
u_t = u_xx + u_yy, in Omega, t > 0
u(x,y,0) = 1, in Omega
u(x,y,t) = 0, on dOmega, t > 0
when Omega is defined to be a domain between the rectangular 1x1 and the circle of radius 0.3 centered at (0.5,0.5). dOmega denotes the boundary of the domain Omega.
I want to solve the problem numerically using explicit scheme for dx = dy = 1/50. And I want to solve it in MATLAB.
So far i got a general scheme for all the points, the problematic and non-problematic ones. But I don't know how to compute it.
I want some code that can, for each point, detect the value of alpha and beta (the coefficients in front of dx, dy when the distance to a neighboring grid point is less than dx or dy, i.e. when the neighboring grid point is on the boundary of the circle), for every point on the grid.
Can anyone help me figure out how to compute this?
Relevant answer
Answer
there are several methods ( using finite difference method) to deal with, for example, crank-Nicolson method , ADI approach
  • asked a question related to Finite Difference
Question
3 answers
Hi!
I am working on adsorption processes for hydrogen purification and I am using Fortran to simulate some breakthrough experiments.
I am using a subroutine based on finite differences for spatial discretization and the routine LSODA to for time integration. The model is the same used by Cruz et al (
Article Cyclic adsorption separation processes: Analysis strategy an...
). I am not using the same numerical methods, but the model is the same.
Using isothermal conditions, the simulations run perfectly and take only a few seconds. The results are consistent with the experimental results.
However, using non-isothermal conditions, the simulation becomes too slow when the contaminants start to breakthrough.
For example: I have a column packed with an activated carbon, initially clean (only filled with helium, which does not adsorb). After t=0+, I start to feed 75 % Helium and 25 % CO2.
When simulating this under non-isothermal conditions, the program becomes very slow right before the CO2 starts to breakthrough the column. It takes 10 seconds to simulate the first 800s but to simulate the rest, it takes more than 2 hours (to simulate more 100s). If I remove the heat of adsorption, the simulation runs fast.
Does anyone had the same problem or have any idea why is this happening?
Thank you in advance!
Relevant answer
Answer
Thank you for your answers. It didn't make sense to me that the simulation becomes slow only when the contaminants starts to breakthrough, since I have considerable heat effects along the column.
Somehow, some lines in my code that are not working properly:
This lines:
DO IPX = 1, NumPtosX
Press(1,2,IPX,1) = ......
END DO
should be the same as
DO IPX = 2, NumPtosX-1
Press(1,2,IPX,1) = ......
END DO
IPX=1
Press(1,2,IPX,1) = ......
IPX=NumPtosX
Press(1,2,IPX,1)= ......
However, using the second approach, the simulation does not stop!!! I have no idea why this is happening. I didn't transcribe all the lines of the code, but the values used for the calculations are exactly the same!
Well, it is working now!
Thank you!
  • asked a question related to Finite Difference