Science topic

# Numerics - Science topic

Explore the latest questions and answers in Numerics, and find Numerics experts.
Questions related to Numerics
Question
Hi folks!
Let's say that I have two lists / vectors "t_list" and "y_list" representing the relationship y(t). I also have numerically computed dy/dt and stored it into "dy_dt_list".
The problem is that "dy_dt_list" contains a lot of fluctuations, and that I know that it MONOTONOUSLY DECREASES out of a physical theory.
1) Is there is a simple way in R or Python to carry out a spline regression that reproduces the numerical values of dy/dt(t) in "dy_dt_list" as best it can UNDER THE CONSTRAINT that it keeps decreasing? I thus want to get a monotonously decreasing (dy/dt)_spline as the output.
2) Is there is a simple way in R or Python to carry out a spline regression that reproduces the numerical values of y(t) as best it can UNDER THE CONSTRAINT that (dy/dt)spline keeps decreasing? I thus want to get y_spline as the output, given that the above constraint is fulfilled.
I'd like to avoid having to reinvent the wheel!
P.S: I added an example to clarify things!
Hi!
There is C-library "GNU Scientific Library" - chapter 29 "Numerical Differentiation". It's free software.
There is FORTRAN-C-...-Pyton-library "IMSL". Is it possible documentation will be sufficient supporting? Documentation is free.
Best regards.
Question
It will be very helpfull  if one can provide me for example an excel sheet or like this showing how applying the NLDFT to calculate pore size distribution from experimental N2 adsorption isotherms ?
Regards,
Following
Question
I have a system dynamic that is non-smooth because it has several signum and absolute value functions in it (three-tank level control).
I can obviously choose different sigmoid functions to approximate the dynamics in a way that they become n-times continuously differentiable.
Can somebody point me out to a systematic approach for doing this?
I can think of many ways to approximate the functions but it is difficult for me to decide on the "best" one.
Right now I would base my decision on the following criteria:
- smoothness (differentiability class)
- numerical computation effort (especially concerning integration)
An example term that I would want to be smooth would be:
$$sign(x_1 - x_2) \sqrt{abs(x_1-x_2)}$$
The context of my question is nonlinear model predictive control.
One simple way to make "x" n-smooth:
1) Pick a filter (IIR or FIR) with an n-smooth impulse response
2) Filter "x" with this filter
Since the result of filtering is a convolution of "x" with the impulse response of the filter, it will be at least n-smooth.
If you use an IIR filter (e.g. for computational/memory purposes), you may want to use a Bessel filter to ensure flat group delay and the smallest time-bandwidth product.
Question
How can I get the numerical solution of the Reynolds equation for the contact pin on disk pitted?
Maybe you can start reading this: http://www.tribonet.org/wiki/reynolds-equation/
Question
Good evening, i am studing a crack under a mode I (opening) loading located in a structure with non-homogeneous bondes, this problem can be reduced to a singular integral equation with a simple Cauchy type singular part and another complex-valued part, the obtained form is shown in the fingure below, i need to now what is the normaly used numerical procedure to solve this kind of SIEs that involve a complex Kernel part. thanks
You can use Legendre multiwavelets for the solution of singular integral equation with a simple Cauchy type singular part and another complex-valued part for the evaluation of the stress intensity factor at the tip of the crack with the aid of the approximate solution. You can see the article
Question
Why my NUMERICAL EXPERIMENTS results almost no change with the increase of the proportion of labeled data?
data: orl-face-data. 50% of per class of the data is train_set,the other is test_set
Now, I encountered the similar problem, do you find out why? Thank you
Question
A perennial question from my students is whether or not they should normalize (say, 0 to 1) a numerical target variable and/or the selected explanatory variables when using artificial neural networks. There seems to be two camps: those that say yes, and those that say it is unnecessary. But what is your opinion ....and importantly, why?
It is better to normalize data in order to have the same range of values for each of the inputs to the ANN model. This guarantees stable convergence of network weights and biases.
Question
Is a PhD research work and Numerical FEA will be used. Additional sources of literature will be appreciated.
Question
Hello
I use newmark method for solve numerical dynamic of equation in SDF system.
when solve liquid by MFS method and get interaction force,
This Force don't converge.
I would be grateful if answer this question.
sincerely
thanks for answering me Mr Behnam Farid
I wish you success in your life
Question
it seems like that in research gate. All added manuscript just labelled authorship numerically as 1st, 2nd. etc. However, some articles are actually co-first authorship. How to indicate that?
Hi Yajie,
You cannot indicate joint first authorship on ResearchGate unless you also add the full text. That way a reader can look at the paper and see the list of authors, plus any note indicating authorship status.
Cheers, Matt
Question
In a questionnaire questions are posed that give answers Yes / No, Likert scale and numerical measures. I need through all the answers, to obtain a single measure that quantifies the values in a unified way.
When a researcher use a scale developed by others, then one should follow the scoring system as established the the original author. The psychometrics of the scale will be altered if handled in a different way than the original format.
Question
I have a curve and some mathematical model functions. I want to test each of these models, using TableCurve 2d, but I don't know how to insert the functions list of TableCurve.
For example, I want to add this function : Y=exp(-aX)
Good  @Stephan
Question
After converting my datas to .arff format,I have applied numeric to binary filter,but still i cant able to enable FPGrowth. For FPGrowth all the datas has to be converted to boolean values,for this i cant able to locate ignoreclass set to true,please help me to resolve this.
Hi Sumathi,
I'm not sure if I understand you correctly. You're not able to run "FPGrowth" even after applying "NumericToBinary" filter. Right? If this is your case, here is my answer:
WEKA by default considers last attribute as a class attribute (which is not necessary for unsupervised learning on general, that is represented here by FPGrowth algorithm).
However, after applying "NumericToBinary" filter, you need to remove the last attribute (presuming it is not necessary in your task) either by selecting this attribute and then pressing the "Remove" button in the "Preprocess" tab, or directly by applying the "Remove" filter from "Preprocess" tab as well. Now, FPGrowth can run normally.
Please let me know if you still have further issues.
HTH.
Samer
Question
Barlat 1989 is a yield criterion for anisotropic material. To use this model, its constitutive parameters must be determined experimentally for specific material. In this model there is a parameter p which must determined numerically. But I do not know the procedure. I will appreciate if anybody know the procedure and let me know.
Actually nemerical procedure is basically the approximation technique by ABAQUS ANSYS or  LS dyna.
As from the flow curves of stress strain we can find the material parameters of K n alpha in Hollomons  law, Ludwiks law, Swift law or Voce law.
Question
Iam carrying out research work in mines...I had solid data of mines with numerical..I want to reduce some factors from the data available..getting confused which approach is best suit to reduce the small factors rather than factor analysis/DOE. can ANNOVA can be used as factor reduction technique?
You should describe a little more about the data. For example, do you mean true factors or just variables? Also, what is the goal in testing the model? Are you trying to create something theoretically meaningful or are you just trying to maximize explanatory power? The answer to these q's will greatly affect the answer. I would however not recommend step wise regression. This is an often implemented technique but a very poor one. You end up with inflated type 1 error and a model that may not be very meaningful. If you are just trying to maximize explanatory power, step wise is not the worst, but you should definitely cross validate if you choose to use step wise.
Question
I am working on a 200-year numerical macro simulation. There are 2 treatment variables which means I have 4 different simulations. I want to find the effect of one treatment variable on the effect of the other. I am implementing a policy (one of the treatment variables), and I want to see the effect that the other treatment variable has on the effect of that policy. Is there a way to find this by differencing the time paths of the four treatments?
My two treatment variables are demographic change [D] (i.e. whether or not the labour force is affected by a baby boom-bust) and a policy [P].
Is it meaningful to look at an interaction term?
Policy effect: (ND|P) - (ND|NP)
Demographic effect: (D|NP) - (ND|NP)
Interaction effect: (D|P) - Policy Effect - Demographic Effect
My other idea was to look at the difference between the policy effect with demographic change and without it:
[(D|P) - (D|NP)] - [(ND|P) - (ND|NP)]
Is any of this meaningful?
Any help would be greatly appreciated.
Best,
Mackenzie
I agree with Dr.Ronald. Its argument is completely true and helpful to you.
Question
When solving PDEs numerically by discretization, we often require a test case. In most equations I encountered, the test cases already exist. But I need to know how I can define my test case easily. Moreover, must I require initial/boundary conditions to create a test case?
You can typically use the Method of Manufactured Solution (MMS). Choose whatever solution you like (so long as it is appropriately differentiable) and plug it into your PDE. Whatever comes out on the right-hand side you can simply add as a forcing term. Initial and boundary conditions are directly derived from the solution you chose.
Question
To convert fingerprint to numeric which can then be used for generating cryptographic key
Though never tried but i think we can compute the hash of the finger print ( which is an image) and can use the hash value as the key.
Question
You should consider for numerical solutions of nonlinear BVP.
There is no theorem which tells us about polynomial approximation of a BVP. However, if you choose to apply Collocation method, select polynomials which are zeros on the boundary and select roots of a  orthogonal polynomial as collocation points.
Question
I tried to solve it using finite difference method.  But I am not able to obtain the solution.
Herewith I have given link of the paper in which the form of the Landau-Lifshitz equation is given and I am try to solve the same numerically the full  Landau-Lifshitz equation  with and without spin transfer torque term...
Question
Any work on "How we calculate uncertainty in numerical data like lattice constant and urbac energy"?
Question
Thanks
I would say you need an equation like (1- ∑| ΔV |/ (∑ |V1|+|V2|) ) * 100 .
Which if it is perfect match gives 100 and if it is anti-match (like V1=1, V2=-1) it gives 0. However, this kind of equations are not an standard way of calculating matching between two sets of numbers. The best why is to calculate the correlation function.
C=  ∑V1V2/ ∑V1 ∑V2
see
Question
I am working on numerical wavelet analysis, recently for approximating some highly oscillating function in a very small support in finite domain some difficulty arise.
It depends entirely on your context, like whether you have a continuous or a discrete inner product. The Dirac function (or rather its action as a distribution in an integral) can be approximated in may ways. For example, as a limit of normal (Gaussian) distributions, or in a completely different setting, in terms of cardinal sine functions, i.e., the sinc functions, sinc(x) = sin(pi*x)/(pi*x). Check out the Wikipedia article on sinc functions to see whether it might be of use to you.
But without further knowledge of your context, it's impossible to answer the question.
Question
RLS algorithm is accused of numerical instability due to the way Riccati update is formulated. One way to over come this issue is to use QR-decomposition of the auto-correlation matrix. However, it was discovered that if the symmetry of covariance matrix is maintained the RLS algorithms remains stable. Is it true? Can anyone provide a reference.
You are right: essentially, I offered you almost singular matrix, which is due to numerics indefinite. The simplest way of generating numerically difficult problems is to introduce deterministic linear dependence between entries of modeled multivariate variable.
Question
I understand Fisher score is a feature selection methods. Are there other methods similar to Fisher score for mostly numeric variables and 2 class problems.
we can use fuzzy logic or other classification method as SVM
Question
How to get numerical solution to the poisson equation of Independent double gate MOSFET in COMSOL multiphysics ?
PFA for the equation and boundary conditions.
use mathematical modeling to solve poisson's  equation
Question
I have a scanned curve and I want a software that converts an image file showing a graph into numbers.
Could you suggest one?
Hello,
another software also is Plot digitizer. This program will allow you to take a scanned image of a plot (in GIF, JPEG, or PNG format) and digitize values off the plot just by clicking the mouse on each data point.
Question
dx/dt = A*x+B(u); y = C*x+D*u;
x(t0) = x0;
objective function J = int_{t=t0}^{tf} (1 + a1*u^2)dt
ending time tf is free.
constrain on the ending value of the first state:  x_1(tf) = x_{1, tf}
where
A number of parameters in A, B, C, D vary linear-piecewisely with the first state x_1;
B(u) is nonlinear function of input u, e.g., B(u) = [u, u, u^2, u, u]^T
constrains:
input constrain: u_min < u < u_max;
output constrain:   y<y_max;
Hi, Aliakbar.
I suppose you mean let t = k*n,  then ending time tf = k*N, where N is the total number of steps.  Thus the total number N can be fixed, while k is a variable time scale factor (depending on ending time tf). Do I get it right?
Regards
Question
i need to know which method is selected when simulating in fluent.
Hi. Their differences are in coupling of the pressure and velocity terms. it will be useful in running time and CPU calculations. It depends on the physic of the problem under investigation
Question
I want to do clustering and evaluating the clusters.I have mixture of nominal and discrete numerical data. I did clustering and now i want to use some useful indices to choose the best number of clusters. which of the  internal indices i should use? I mention again that the data are mixture of nominal and discrete numerical data. Thanks
Perhaps there you will find the answer.
Question
Can somebody give me an example to design a controller using h2 optimal control?
There is another book with title 'Feedback Control Theory' by Doyle and Francis. There are also very good examples in that book.
Question
Consider an N-dim to N-dim iteration scheme:
xn+1= F (xn)     where x's are N-dim vectors and F is an N-dim -> N-dim polynomial-type function.
From the physical background,  we know that this iteration sequence should converge to a fixed point or a limit cycle.  But somehow numerically it diverges.  I suspect it's the accumulation of numerically errors.  Is there a standard way to stablise the iteration process?  Thanks!
Dear Zhi Lin
The iterative process converges when the function in its definition domain is Lipschitzian i.e. the absolute value of its derivative is less than 1. This means that if this condition is not fullfilled you cannot stabilise the iteration process, since de function diverges. The function must absolutely converge!
Regards,
G.C.
Question
I am a member a an fsae team and require to design a muffler to comply with the rules kindly help me in designing my muffler for a royal enfield 499cc engine.
InsyAllah I will explain in detail soon.
Question
I am currently during research on spam review detection. I have it based on supervised method SVM. I have to implement it as my research project. I want to know how I can convert a review text into numerical value to give as input to the SVM method. What features can I use for better performance of spam detection? Please give me your helpful suggestions.
Hi,
You can try topic model to convert the text into a probabilistic combination of different topics.
Best regards.
Question
Nowadays all of the major Fortran related numerical calculus have exactly mapped equivalent libraries in more modern language framework like Numerical Python (NumPy) and Scientific Python (SciPy).
What keeps physicists stuck with Fortran?
Performance?
Portability?
Scientific evidence?
Fortran is the favorite whipping boy of the programming world.  People feel completely comfortable making condescending statements about the language and those who use it.  I've been coding since I was 12, taught myself three languages by 10th grade (including 6502 machine language coded in hex), and learned several more by the time I finished grad school.  Fortran has become my language of choice for many reasons, but being "stuck" isn't one of them.  Expressiveness is part of it.  Support for mathematical calculations is another. And performance is very high on the list.  But the number one reason from which most of my other reasons flow is that Fortran is the only language with an international standards body that sees scientific programmers as its target audience
On performance, take a look at this comparison of Fortran, C++, and Python in a domain of broad interest in physics (solving PDEs):
Python isn't even in the running and C++ only comes close on the largest problems.  And on the performance question, I think it's important to note that, in the multi-core/many-core world, high performance necessitates parallelism.  Fortran is the only  standardized language with its own high-performing and scalable parallel programming model in the form of Fortran 2008 coarray parallel programming.  If you download OpenCoarrays (www.opencoarrys.org), the test suite contains multiple PDE solvers, including
(1) an object-oriented, parallel Burgers equation solver that has been shown to scale 16,384 cores with 87% parallel efficiency using nothing but Fortran 2008 with no need to embed any compiler directives or calls to libraries external to the language (I'll be glad to provide references if desired), and
(2) a spectral Navier-Stokes solver for which the coarray Fortran version outperforms the MPI version even when the compiler uses MPI under the hood to support coarray communication and synchronization.
While I think Python is wonderful and is great for scripting purposes, I'm more likely to move to something like Julia if and when I finally switch away from Fortran for production code.  Like Fortran, Julia was conceived with numerical computation and high performance in mind.   For a great perspective on languages for scientific computing, including Fortran, Python, and Julia, see http://arstechnica.com/science/2014/05/scientific-computings-future-can-any-coding-language-top-a-1950s-behemoth/
Question
I need to solve linear equation like this:
A*X=B
where A is square and singular.
Any one feasible solution is OK and just what I need.
It is solvable manually but too troublesome if the dimension is high.
So how can I solve such a given equation by tools like MATLAB?
Use pinv function - Moore-Penrose pseudoinverse of matrix.
Consider an example:
A = [1 2 3 4; 5 4 3 2; 0 0 0 1; 0 0 0 2]
x = [1;3;5;7]
b = A*x
Matrix A is singular, so solution by means of mldivide is not satisfactory:
A\b
Warning: Matrix is singular to working precision.
ans =
NaN
NaN
NaN
7
If you use pinv:
pinv(A)*b
ans =
1.0000
3.0000
5.0000
7.0000
Which is equal to the original x.
You can also solve your set of equations by means of least squares method.
Question
I want to change the numeric attribute value for "age" to categories "young and old" by setting a cut off of 50. How to do it in weka?
Take a look at this YouTube WEKA discretization tutorial:
When performing discretization you must pay attention to overfitting and missing data problems.
It is wrong to divide a numerical scale into many small discrete classes or bins because it will lead to overfitting. Such small intervals are usually over trained on the learning dataset and not universal. This can be solved by setting the least number of individuals for each class. Actually, this first proposed way back by Robert Holte. The optimal choice for cut off (i.e. discrete class boundary) is where the target class is changing. If you are really sure that value is "50" in your dataset than there's no problem, but this is entirely your judgment ("expert opinion") not necessarily what the data is saying. You have to be aware of that.
Missing data is another huge problem in discretization because it can lead to wrong cut offs. Missing values can be interpreted as a specific attribute values. However, this can be problematic if a large number of attributes with missing values relatively accurately predict the target class.
Hope this helps,
Marko
Question
How can I validate my experimental results of DMA. Is there any methods which I can follow. If there is any way then please send me the links
thank you... Dr.Linyong Song
Question
The numerical equations to calculate the drain fuel back from injector to diesel tank.
From experiments, one can estimate the mass of fuel consumed by the engine from the fuel gauge.  The useful heat converted to mechanical work from the power developed by the engine, the energy associated with the exhaust gases, and water through accurate measurement of mass flow and temperatures over a period of time can be estimated using relevant equations.  Following a suitable method one can determine the power associated with friction. Making a balance between the energy associated with the combustion of fuel and the heat transformations, the quantity of drain fuel can be determined.
For numerical calculations, an iterative approach may be resorted from the quantity of fuel supplied and the energy released by combustion.  Alternately, one can assume a a certain percent of fuel to be drained from injector.  Depending on the modeling undertaken, suitable approach in numerical modeling may be resorted.
Question
I'd like to know if anyone has any books/links /article on "solving boussinesq equations using numerical methods". Particularly some stuff on "MOL( Method of Lines)".
Very generally speaking, the Method of Lines approach is to first spatially discretize the PDEs (in this case, the Boussinesq equations) and then use a time-integrator to advance the resulting system of ODEs. The choice of discretization method depends on the geometry and the Prandtl number of the Boussinesq equations. For example, people use finite differences and even Chebyshev pseudospectral methods for this purpose. However, the equations may have complicated boundary conditions, in which case people use things like the Influence Matrix method.
For solving Boussinesq equations with an infinite Prandtl number in a spherical shell, see Yoshida, M., and A. Kageyama (2004), Application of the Yin‐Yang grid to a thermal convection of a Boussinesq fluid
with infinite Prandtl number in a three-dimensional spherical shell. See also this paper by Wright, Flyer and Yuen which combines RBF-PS and Chebyshev-PS to accomplish this (http://scholarworks.boisestate.edu/cgi/viewcontent.cgi?article=1027&context=math_facpubs)
Question
Please suggest a simple approximation to TANH() function.
Dear Naven, you can find a rational function to approximate tanh:
tanh(z)= Tanh[z] == z/(1 + z^2/(3 + z^2/(5 + z^2/(7 + z^2/(9 + z^2/(11+z^2/(13 )))))))
just look at  the web link:
but may be this is more complicate than the standart polynomial  interpolation function described by Guy Caniaux from CNRM center.
regards
hubert
Question
Take all the naturals and for each pair (i, j) with i<j create a directed edge i -> j with fixed probability p, thus obtaining an infinite DAG (directed acyclic graph) G.  Let T be the transitive reduction of G (which is unique). How does the length of the shortest path *in T* from node h to node k (if any) grow with their 'numeric distance' (k - h)?
(The *longest* path from h to k should grow linearly with their numeric distance.)
Dear Behnam Farid, thank you for the pointers.  The first paper refers to distance in the plane, while I need graph distance.  The Frish and Hammersley paper looks more general, and I am trying to get a copy... Thanks a lot.
Tommaso
Question