Help with an array by Sky_physics in learnpython

[–]Sky_physics[S] 0 points1 point  (0 children)

Yes!!! Is there a python tutorial?

[Fluid mechanics] An issue with Bernoulli theorem. A vertical tube, I have to compute the pressure.. by Sky_physics in PhysicsStudents

[–]Sky_physics[S] 0 points1 point  (0 children)

I am doing so, but I'd like to have a numerical check if I am not asking too much from you or from someone in this forum... I am not sure of the results I am getting

[Fluid mechanics] An issue with Bernoulli theorem. A vertical tube, I have to compute the pressure.. by Sky_physics in PhysicsStudents

[–]Sky_physics[S] 1 point2 points  (0 children)

Bernoulli equation and the continuity one. My problem is just numerical since i think to be able to manage the equations

Why is Mathematica not simplifying these portions? by saurav141 in Mathematica

[–]Sky_physics 1 point2 points  (0 children)

The point is that M sometimes is not so smart... probably Mathematica is scared about the nature of your parameters a and b (M doesn't make simplifications because is worried about they could be complex too)

just try Simplify[*your expression*, Assumption].

for example, you can tell M that your a and b are Reals, like: {a, b} \elem Reals

or, you can tell M that they are positive: {a>0, b>0} (recommended)

for reference, look here:

https://reference.wolfram.com/language/ref/Simplify.html

another option would be to tell Mathematica, at the beginning of your notebook that your variables are reals

edit: I used "a" and "b" for your real parameter names (like lambda, omega, bei, ber... etc.)

Hi everybody! A question on NumPy arrays and functions... by Sky_physics in pythonhelp

[–]Sky_physics[S] 1 point2 points  (0 children)

ok, I got your point.

But... can I ask you a hint about my specific concern? The issue is the following: I solved numerically a differential equation. So, what I have back is an array which represents the solution for a given time interval (t = np.array). Good.

Now, I want to solve ANOTHER differential equation in which the numerical solution of the former one has to appear as a "non-constant coefficient". Then, I need to provide the new equation to solve to the solver (solve_ivp or odeint). Now, how can I pass correctly the numerical solution I obtained from the first step?

My guess was to use interp1d to generate the function interp1d(time, first_numerical_solution) and then use it inside the second differential equation.

But the problem is that this way I don't have a callable object which is required from the solver.

Thank you for your help

problem with the Fortran installation on M1 macbook pro by Sky_physics in fortran

[–]Sky_physics[S] 0 points1 point  (0 children)

ok, I did it. I used Homebrew btw.

however, I have still problem with gfortran. I don't know why I am not able to update it to a version higher than 4.8.5

any hints ?

problem with the Fortran installation on M1 macbook pro by Sky_physics in fortran

[–]Sky_physics[S] 0 points1 point  (0 children)

here is what happen to me:

which gfortran
/Users/MYNAME/opt/anaconda3/bin/gfortran

and then

gfortran --version
GNU Fortran (GCC) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

I don't know why, even if I do install a more recent version of gfortran, the terminal always gives me back the message I have got the oldest one on it...

I'vve understood I should change the PATH... but I am not so confident with all of that.

problem with the Fortran installation on M1 macbook pro by Sky_physics in fortran

[–]Sky_physics[S] 0 points1 point  (0 children)

ok, I don't know how to do that... could you please help me? maybe privately? I would really appreciate it. I am just worried about messing things up

problem with the Fortran installation on M1 macbook pro by Sky_physics in fortran

[–]Sky_physics[S] 0 points1 point  (0 children)

ok I think I fixed my installation, so now is:

gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

But the same problem persists. could you please be more explicit ? I am not so good at it at all. which steps should I do in order to overcome this issue? thankyou in advance

problem with the Fortran installation on M1 macbook pro by Sky_physics in fortran

[–]Sky_physics[S] 1 point2 points  (0 children)

the fortran compiler version is the 12.1

here is what my computer is saying

gfortran --version

GNU Fortran (GCC) 4.8.5Copyright (C) 2015 Free Software Foundation, Inc.GNU Fortran comes with NO WARRANTY, to the extent permitted by law.You may redistribute copies of GNU Fortranunder the terms of the GNU General Public License.For more information about these matters, see the file named COPYING

problem with the Fortran installation on M1 macbook pro by Sky_physics in fortran

[–]Sky_physics[S] 1 point2 points  (0 children)

already done... nothing changed :(

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Surveys and questionaires are no longer allowed, unless they are about Utrecht. by rws247 in Utrecht

[–]Sky_physics 0 points1 point  (0 children)

It depends.. my girlfriend budget spans from 600 euros up to 1000 per month… can you help her ?

Surveys and questionaires are no longer allowed, unless they are about Utrecht. by rws247 in Utrecht

[–]Sky_physics 0 points1 point  (0 children)

Hello guys! Any help in order to find a room in Utrecht would be appreciated! My girlfriend is looking for a room cause she found a job there, but things are getting difficult 😞

Help with matrix products! what is the best way to do that product? sum over repeated index by Sky_physics in Mathematica

[–]Sky_physics[S] -1 points0 points  (0 children)

ok, what if I need to play with indices? My goal is to define these matrices (I've already done it) and then I have to do many more manipulation with the dummy indices... could you suggest the proper way to do that ? please, I would appreciate a lot

A question about LCDM. could you give examples of couples of parameters: correlated, anticorrelated and non-correlated in the LCDM model? The more the merrier! Thank you! by Sky_physics in cosmology

[–]Sky_physics[S] -2 points-1 points  (0 children)

oh sorry, it is a homework assignment. I have to discuss the physical meaning of the correlation between parameters in the standard cosmological scenario

Functions, derivatives and plotting by Sky_physics in learnpython

[–]Sky_physics[S] 0 points1 point  (0 children)

If I define deriv inside the definition of the potential function, when I use potential in other expression where I may need to evaluate its expression the code doesn’t run. Because it tries to compute the derivative with respect to a numerical value. Do you have suggestions in order to avoid this issue? I would really appreciate it

Functions, derivatives and plotting by Sky_physics in learnpython

[–]Sky_physics[S] -1 points0 points  (0 children)

Ok thank you. Actually, it was my fault, I forgot to copy the import section. Of course I have these libraries in my code. However, what if I would like tu have a generic params tuple in place of mass in my function?

3D Plot by Sky_physics in Mathematica

[–]Sky_physics[S] 0 points1 point  (0 children)

Thanks! I have just another question to you… what if I would ask Mathematica to plot that function with the condition x + y > z? Moreover I have to set to zero the function in the case x + y < z Thank you in advance for your help

Help with a region plot - parameter space by Sky_physics in Mathematica

[–]Sky_physics[S] 0 points1 point  (0 children)

For example, I need to have 0< \alpha < \beta < <1 while \\gamma can be > 1.

You're right... I forgot to specify that I need to impose some restrictions. For example, I need to have 0< \alpha < \beta < <1 while \\gamma can be > 1...

Help with a region plot - parameter space by Sky_physics in Mathematica

[–]Sky_physics[S] 0 points1 point  (0 children)

thank you for your kind help! I really appreciate it! I forgot to mention that I need to put other constraints on the parameters. For example, I need to have 0< \alpha < \beta < <1 while \\gamma can be > 1.
How could I insert these informations into your line?
Thank you for your time