Closed cyhng closed 6 years ago
wrong energy unit, it should be hbar c / micron
At very large separations the --energy
calculation is inherently inaccurate for numerical reasons---it is subtracting two large numbers that are nearly equal to each other (namely, the total energy of the spheres at the given separation, minus the total energy at infinite separation) and beyond a certain distance the signal will be swamped by numerical noise coming from numerical cancellation.
There is a command-line option called --NewEnergyMethod
that tries to reorganize the calculation in such a way as to reduce these errors. You might consider giving that option a try and seeing if it works better for you. However, my experience is that it doesn't make much of a difference.
The correct thing to do here is simply to compute --zforce
instead of --energy
. The force calculation uses a different algorithm that avoids the catastrophic loss of numerical precision in the energy. If you really need energy data, you can always just integrate the force data starting from 0 at infinite separation.
Feel free to ask more questions, or close the issue if satisfied.
thanks for the help
Dear Homer, Suppose I want to calculate the long range Casimir force between two sphere at room temperature, what can I do to improve my results? I used the folder CasimirSpheres under TestSuite at main branch as example.
I ran your code with following arguments. CODE=${DIRBASE}/scuff-cas3D
ARGS="" ARGS="${ARGS} --geometry PECSpheres_327.scuffgeo" ARGS="${ARGS} --TransFile Spheres.trans" ARGS="${ARGS} --Energy" ARGS="${ARGS} --Temperature 300" ARGS="${ARGS} --RelTol 1.0e-5"
${CODE} ${ARGS}
I obtained a plot like this![casimirspheresexample](https://user-images.githubusercontent.com/19286702/27643777-92ca3b78-5c54-11e7-8e7c-67663abd8d2d.png)
The magnitude of force at long range doesn't decrease at all. Any tips for us?
Best regards, Henry Ng