Rotating a cylinder and using elliptical cylinders in an endotherm

65 views
Skip to first unread message

David

unread,
Jul 16, 2025, 10:27:48 PM7/16/25
to NicheMapR
Hello, this is my first conversation here, and probably not my last. When you specify what shape, in my case a cylinder, to simulate in GEOM_ENDO (I'm doing endotherm simulations), what orientation is it? Like is it vertical or horizontal and could I set that orientation myself? Additionally, is it possible to make an elliptical cylinder, so its bases are ellipses rather than circles? I should have probably used ellipses initially for my modelling rather than cylinders as it appears that they're better supported than cylinders, but I'm already a bit too far into constructing my organism out of cylinders to start over with ellipses. I had the idea to do this from a paper by Lovelace et al. from 2020 in PLoS One that modelled some dinosaurs with NicheMapper and it uses a horizontal, elliptical cylinder for the torso as well as a cylindrical neck that is rotated 40-45 degrees from the horizontal. Would that be possible in NicheMapR? If there is no way to do this without modifying the underlying functions or subroutines myself then how should I go about doing such and where should I make changes?

Here is the supplementary data from that paper that shows the construction of the animal's torso and neck:
Parameterizing biophysical model dimensions for fossil vertebrates.

Thank you so much,
David.

NicheMapR

unread,
Jul 16, 2025, 11:45:29 PM7/16/25
to NicheMapR
Hi David,

Good question. You can choose the orientation of the cylinder to the sun but the physical geometry is horizontal. The relevant code is below. You can make your own geometry function to accommodate your specific requirements. We will make a Julia version of this program in the near future which will make this kind of customisation much easier. There's no generic code for multi-part organisms at present in NicheMapR though I have recently made a human model which is present in the latest github version that is multi-part. It's a bit tricky, e.g. you need to account for the joins so there isn't too much surface area. I have a plan to include a generic multipart framework in the future but not sure when that will happen. Perhaps it is something that interested members of the group could collaborate on. Ofir Levy and his group are interested in this, for example.

All the best,
Mike


C     CYLINDER
      IF (INT(SHAPE) .EQ. 1) THEN
       R1 = (VOL/(SHAPEB*PI*2.))**(1./3.) !R_SKIN
       R2 = R1 + ZFUR ! R_FA
       ALENTH=SHAPEB*R1*2.
C      FUR-AIR AREA = END CIRCLE AREA + CIRCLE PERIMETER * LENGTH (LENGTH = 2*D2)
       AREASKIN=2.*PI*R1**2.+2.*PI*R1*ALENTH
       ATOT=2.*PI*R2**2.+2.*PI*R2*ALENTH
       AWIDTH=2.*R1
       AHEIT=AWIDTH
       AREA=ATOT
       IF((INT(SUBQFAT).EQ.1).AND.(MASFAT.GT.0.00))THEN
C       COMPUTE SUBQ FAT THICKNESS
        FLSHVL = VOL- VOLFAT
        RFLESH = SQRT(FLSHVL/(PI*ALENTH))
        FATTHK = R1 - RFLESH
       ELSE
        FLSHVL = VOL
        RFLESH = R1
        FATTHK = 0.      
       ENDIF
       ASILN = AWIDTH * ALENTH
       ASILP = PI * R2**2.
       IF(INT(ORIENT).EQ.0)THEN ! AVERAGE POSTURE
        ASIL = (ASILN + ASILP)/2.
       ENDIF
       IF(INT(ORIENT).EQ.1)THEN ! NORMAL TO SUN'S RAYS (HEAT MAXIMISING)
        ASIL = ASILN
       ENDIF      
       IF(INT(ORIENT).EQ.2)THEN ! PARALLEL TO SUN'S RAYS (HEAT MINIMISING)
        ASIL = ASILP
       ENDIF
       IF(INT(ORIENT).EQ.3)THEN
        ASIL=2.*R2*ALENTH*sin(ZEN*pi/180.)+pi*R2**2.*cos(ZEN*pi/180.)
       ENDIF
        D = VOL**(1./3.)
       GO TO 999
      ENDIF

David

unread,
Jul 17, 2025, 9:43:55 PM7/17/25
to NicheMapR
Thank you for this! I looked at this last night and I'll continue to tinker with the Fortran code until I can get the right specifications for my project. Another question, what orientation are cones by default? I forgot to mention them in my initial post but since I'm using one for the tail of my organism It'd be nice to know. Also, do I need to modify any other subroutines outside of GEOM_ENDO if I want to add a new shape?


Thank you so much,
David.

NicheMapR

unread,
Jul 18, 2025, 6:27:23 AM7/18/25
to NicheMapR
Hi David,
Cones aren't currently included so you'd have to write your own code for that I'm afraid. And yes if you are adding different shapes then the equations for specific heat generation are different, and not necessarily straight-forward to derive, so I'd suggest keeping with the existing shapes for now (check the simulsol fortran code).
All the best,
Mike

David

unread,
Jul 19, 2025, 8:56:15 PM7/19/25
to NicheMapR
Oh sorry, I thought there were, whoops. I guess from looking at that figure from the paper so much I thought there was a cone option. That's alright, I'll just use an aptly sized cylinder for the tail. I probably won't be making any modifications to any subroutines for this current project, but I'll definitely keep it in mind for future simulations. I'll base my project off of the human model, but yesterday I noticed something strange about it that I would like some clarification on. To properly account for when two body parts are touching, the PCOND for one body part should be set to the percent of its surface area contacting the other part. The homotherm model does this, but because that surface area is now set to be touching the substrate, shouldn't the ground temperature (TGRD) be set to the body temperature, and the thermal conductivity of the substrate (KSUB) be set to that of the desired organism? I found that in the homotherm model on GitHub neither TGRD nor KSUB are set to what I would expect for a human and instead are based on the air temperature and the default substrate conductivity respectively. Is this intentional, and/or am I missing something?


Thank you so much,
David.

NicheMapR

unread,
Jul 20, 2025, 7:16:27 PM7/20/25
to NicheMapR
Hi David,
The paper describing that HomoTherm model is currently under review but perhaps I should put it up as a preprint. There is no conduction with the ground in the HomoTherm model and instead I made it so the body parts were conducting with each other at their joins at the core temperature so there is in effect no heat exchange going on at the joins. It's my kludgy way of sticking the limbs together (and without explicit effects of blood flow between limbs).
All the best,
Mike

David

unread,
Jul 26, 2025, 10:20:48 PM7/26/25
to NicheMapR
Thank you for the clarification, I've successfully made my desired model over the past few days by iterating the HomoTherm model to my needs. I'll definitely be sure to check out that paper once it's published.

Thank you again,
David.
Reply all
Reply to author
Forward
0 new messages