PDE SampleStep and TimeStep

62 views
Skip to first unread message

s.mar...@gmail.com

unread,
Oct 23, 2020, 6:34:37 AM10/23/20
to HAL Q and A
Dear Rafael,

Many thanks for this opensource Java Library. It's awesome. I want to know how the PDEGrid2D function considers SpaceStep and TimeStep in the PDE equation. How is possible to adjust SpaceStep in the formula; For example If I want to be more precise and have less spacestep. Would you please give me some tips about these two important factors in PDE numerical solving?

Best regards,
Sadegh


rafael...@gmail.com

unread,
Feb 5, 2021, 8:16:00 AM2/5/21
to HAL Q and A
Hi Sadegh,

this is a good question, essentially the answer is that you have to take the scaled diffusion coefficient to the timestep and space-step of the model. The manual description of the diffusion and advection functions describes how to do this. In short you have to scale your diffusion coefficients so that they are in terms of model timestep/(spacestep^2), and your advection coefficients so that they are in terms of model timestep/spacestep.

Glad you're enjoying the framework!
- Rafael

s.mar...@gmail.com

unread,
Feb 7, 2021, 6:55:27 AM2/7/21
to HAL Q and A
Dear Rafael,

Many thanks for your response. I scaled the diffusion and solved my problem. I want to simulate my model for 160cm^2 of epithelial cells consisting of 4*10^8 cells, but I face this error: 
"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.desktop/java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
at java.desktop/java.awt.image.Raster.createPackedRaster(Raster.java:467)
at java.desktop/java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
at java.desktop/java.awt.image.BufferedImage.<init>(BufferedImage.java:333)
at HAL.Gui.UIGrid.<init>(UIGrid.java:56)
at HAL.Gui.UIGrid.<init>(UIGrid.java:79)
at HAL.Gui.GridWindow.<init>(GridWindow.java:24)
at HAL.Gui.GridWindow.<init>(GridWindow.java:60)"

I don't know it is because of lack of memory or inability to display all these cells simultaneously in monitoring. How can I solve this problem? 

Thank you so much for your attention and participation.

Yours sincerely,
Sadegh




rafael...@gmail.com

unread,
Feb 8, 2021, 10:52:54 AM2/8/21
to HAL Q and A
Happy to help. There are of course limits to the number of agents that a computer can keep in memory, however the java-imposed default cap can be increased. From page 38 of the manual: Occasionally the user may benefit from increasing the maximum memory allocation pool for a Java virtual machine (JVM) upon execution. This can be accomplished using the “-Xmx” command with the proceeding memory allocation. For example if we wanted to specify 16 Gigabytes we would put -Xmx16G. This is particularly useful when running large-scale simulations on a high performance cluster (see jar file creation). 
When executing a java jar file in command line use “java -Xmx16G -jar TargetJarFile.jar” to execute your model with extra memory. 
However, while in the IdeaJ environment this is accomplished by the following steps:
1. Click on “Edit Configurations” from the dropdown menu on the top right of Intellij next to the run button.
2. Specify the memory using the -Xmx argument in the “VM Arguments” box.

Reply all
Reply to author
Forward
0 new messages