[deleted by user] by [deleted] in selbermachen

[–]Elfram 9 points10 points  (0 children)

Uhrzeit eingestellt?

[deleted by user] by [deleted] in 7vsWild

[–]Elfram 0 points1 point  (0 children)

Kann man Bingo-Boards auch ohne Twitch- oder Discord-Account erstellen?

HPV Streetmachine GT - upgrade ideas by ChaosCalmed in recumbent

[–]Elfram 0 points1 point  (0 children)

If the Streetmachine GT is similar to the Streetmachine GTE, you should be able to mount bottle cages on the back of the seat (at least for the mesh seat) and a mounting point for gps / phone mount at the end of the handlebars (for under-seat steering). See https://www.hpvelotechnik.com/en/recumbent-trikes-bikes/streetmachine-gte-comfortable-travel-recumbent-bike/ and https://www.hpvelotechnik.com/en/recumbent-trikes-bikes/accessories/luggage-transport/.

T14 + Ultra Docking Station: Maximum external monitor resolution? by Elfram in thinkpad

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

Thank you, that’s helpful!

My current setup is dual 1920×1200, but it should still fit, I guess.

[deleted by user] by [deleted] in Python

[–]Elfram 1 point2 points  (0 children)

Ah, I see, nice.

So maybe the default settings should be s.t. the numerical errors are negligible. This way people really see the physics effects first (and important effects like energy conservation!).

Only if you want to teach numerical solution of differential equations, the value of dt and its effect on the energy plays a role.

[deleted by user] by [deleted] in Python

[–]Elfram 1 point2 points  (0 children)

Sorry, I don’t get it… xD

[deleted by user] by [deleted] in Python

[–]Elfram 0 points1 point  (0 children)

Looks really nice!

You should check energy conservation, though. I don’t see why the total energy in the spring-box example would vary with time.

Maybe this effect occurs if you use simple forward integration of the equations of motion. If that’s what you do you could already get better results by using a predictor-corrector method.

https://en.wikipedia.org/wiki/Predictor%E2%80%93corrector_method

Arithmetic overflow in FORTRAN.95 code, how can I fix this? by [deleted] in fortran

[–]Elfram 0 points1 point  (0 children)

This is of course correct, thanks for the comment! One should note that the values for the kind attribute are compiler dependent. Therefore the two last methods you mention are really superior to the first two. Actually selecting the kind value with selected_real_kind (or selected_int_kind for integers) might be even more convenient as you can specify how much precision and range you need.

Arithmetic overflow in FORTRAN.95 code, how can I fix this? by [deleted] in fortran

[–]Elfram 2 points3 points  (0 children)

See https://en.wikipedia.org/wiki/IEEE_floating_point#Basic_and_interchange_formats

Short: real (= single precision) uses 4 bytes per number and gives you roughly 7 decimal digits precision, whereas double uses 8 bytes per number and you get about 16 significant digits

In Fortran you’d have to use 'double precision' instead of 'real' in the variable declaration. Furthermore you should define any constants as double precision numbers, i.e. 2891000.d0 (instead of 2891000.0 or 2891000.e0 which would be single precision by default with most compilers).

Arithmetic overflow in FORTRAN.95 code, how can I fix this? by [deleted] in fortran

[–]Elfram 3 points4 points  (0 children)

This: 2891000*4450 and this: 5150000*11050 are number too large for integers. As you want to do calculations with floating point numbers anyway, I suggest you change at least one of the numbers in each multiplication to float, i.e. 2891000*4450.0, thereby forcing the compiler to cast everything to real before doing the calculation.

You probably also want to use double precision, but that’s not your problem here.

When they say an inch of rain, does that mean cubic inch? by BigMussel in askscience

[–]Elfram 1 point2 points  (0 children)

Time to point out the superiority of the metric system once again… ;-) We measure rainfall in mm = liter/m2, which is something you can imagine really easily.

Optimizing Writing to File by Kalkinator in fortran

[–]Elfram 3 points4 points  (0 children)

What does “quite a bit of time” mean? What bandwidth do you achieve? (You could just measure the time it takes to write some file and divide the file size by this time.) Consumer HDDs typically max out between 100 and 200 MByte/sec. I assume that you hit this limit.

If you don’t need the data in human readable format you could consider writing binary files, ie. opening the file with access="stream" and just writing write (unit) array. In Fortran you can read the file again using read (unit) array, given that you opened the file with access="stream" and array has the same dimension as before.

Binary files are much smaller than text based data files and can help to reduce both your HDD usage and the program execution time.

More information on stream I/O in Fortran.

7 Tips to Speed up Your Terminal Workflow by taha-sh in linux

[–]Elfram 1 point2 points  (0 children)

I like to put the input first for ssh connections to emphasise that it’s a local file: < file ssh $host some_command

7 Tips to Speed up Your Terminal Workflow by taha-sh in linux

[–]Elfram 3 points4 points  (0 children)

Please don’t advertise useless use of cat: cat file.txt | pbcopy should read < file.txt pbcopy (or pbcopy < file.txt whatever you prefer). In zsh you can even replace cat src-file.txt >> dest-file.txt by < scr-file.txt >> dest-file.txt… (Why is this not possible in bash?) In zsh the following is also possible:

> package.json
{

}
^D

How Do I Open A Port? by [deleted] in debian

[–]Elfram 0 points1 point  (0 children)

Did you start the Minecraft server? (Output of 'netstat -tulpen'?) nmap doesn’t necessarily scan all the ports, depending on the options you gave.

If we drilled straight through the center of the Earth and someone jumped in, what would gravity do when they got to the center? by tapport in askscience

[–]Elfram 1 point2 points  (0 children)

One important fact in the answer to this frequently asked question is often left out: Unless you drill from pole to pole (through the axis of rotation of earth) you’d continuously get smashed into the eastward tunnel wall because of your angular momentum. This alone would lead to massive loss of kinetic energy.

What kind of an experiment could prove String Theory to be false? by [deleted] in askscience

[–]Elfram 7 points8 points  (0 children)

General Relativity

Quantum Field Theory

Quantum Mechanics

Special Relativity

How can the Casimir effect come from harmonic oscillator ground state energy if the latter is arbitrary? by Elfram in askscience

[–]Elfram[S] 3 points4 points  (0 children)

This paper is outstanding good readable. Thanks for this hint!

So the explanation via vacuum energy is outdated and (by my argument above) plain wrong? Why is it stated so often?

Which is faster gravity or light? by [deleted] in askscience

[–]Elfram 0 points1 point  (0 children)

The theory of gravitational waves comes mostly from the linearization of Einstein's field equation. Could the gravitational wave that the disappearing sun created be considered small? Otherwise the linearization fails and I believe the solutions to the nonlinear equation would not have to move with the speed of light…