Very cold environment causes error?

I’m trying to get a patient to be hypothermic as quickly as possible (understanding that pulse currently makes this hard). So I made a copy of the SubmergedFreezing.json environment (SubmergedSuperFreezing.json) where the only change was to reduce the AmbientTemperature. It seems that 5 deg C works, but if I use 4 deg C or lower I get this error:

FATAL:Resistance cannot be negative or zero. : ClothingToEnvironment

What’s going on here? Is it a bug or something else?

If I keep AmbientTemperature at 5 deg C and change ClothingResistance to 0.0, I get a different error:

FATAL:Resistance cannot be negative or zero. : ExternalSkinToClothing
FATAL:Attempting to populate a matrix with an infinite value.  Check ExternalSkinToClothing path circuit element. : 

According to wikipedia a value of 0 means “naked body”, which seems like it should be valid.

Looks like a bug at this line

should be:

dResistance_K_Per_W = MAX(dResistance_K_Per_W, m_data.GetConfiguration().GetDefaultClosedHeatResistance(HeatResistanceUnit::K_Per_W));

That 2nd FATAL is also a bug
Looks like I just need to do the MAX on that resistance too


What is the minimum clothing resistance a human can have?
If this is 0, the resistance becomes 0
Which is not good…

Note, using the default closed heat resistance, still craps out the resistance. Seems like we need a minimum, non zero clothing resistance, or a better minimum resistance value for this path…

//Set clothing resistor
double dClothingResistance_rsi = GetEnvironmentalConditions().GetClothingResistance(HeatResistanceAreaUnit::rsi); //1 rsi = 1 m^2-K/W
double dSurfaceArea_m2 = m_data.GetCurrentPatient().GetSkinSurfaceArea(AreaUnit::m2);
double SkinToClothingResistance_K_Per_W = MAX(dClothingResistance_rsi / dSurfaceArea_m2, m_data.GetConfiguration().GetDefaultClosedHeatResistance(HeatResistanceUnit::K_Per_W));
m_SkinToClothing->GetNextResistance().SetValue(SkinToClothingResistance_K_Per_W, HeatResistanceUnit::K_Per_W);

There was a numerical solver issue with a zero clothing resistance. The fixes to this and the other issues previously mentioned were just pushed to the 3.x branch.

Thanks for finding these! Let us know if you find any other issues.

Thanks! I did file a couple issues in the repo issue tracker, but if you’d rather I bring up that stuff here I can do that. I’ve been trying to separate questions about how to use the system, which I post here, from actual issues, which I post there. In this case, I wasn’t sure if there was an issue with the system or if I was just doing it wrong, so I posted here. But maybe I should always post here because more people will see it and could comment on it?

I don’t think we have a “right way” of interacting with the community (you!)
We are still a pretty small community, so its pretty free form…
I think posting here is fine to have more of a discussion, but also posting an issue on something that is more or less a bug, described, simple reproducible, etc. is good on the issue tracker.

Since we have had some discussions with creating a cold environment, discourse is a good place since Pulse does have some issues with the environment/energy concerning this use case.

I think your approach to communication is pretty good.
I just need to find time to dig into the issues.
This one was pretty quick since all I had to do is run the HowTo environment with one modification in C++ and I hit your error really quickly, and noticed the problem

I should probably be more responsive on the issues that I acknowledge the issue as being good and that I am going to look into it…

1 Like
Privacy Notice