lanl / palm_lanl

LANL Contributions to PArallelized Large-eddy simulation Model (PALM)
2 stars 5 forks source link

Adding Multiple Passive Scalars #66

Open katsmith133 opened 4 years ago

katsmith133 commented 4 years ago

I would like to add the ability to for PALM to solve for multiple passive scalars, instead of just one. As far as I see it, there are two primary ways to approach this and I wanted to get input on whether anyone thinks one way is better (or preferred).

  1. Add an additional indicies to the s field, the size of which can be set in the input file by some integer namelist parameter called nscl or something like that. This requires I make quite a few changes to the code that might also affect things that others are doing, but is the most generic way to do this.

  2. Follow what was done in the atmospheric part of the code and make a new variable called something like biochem_species which is wholly separate from the passive scalar s and can be solved for and messed with in a completely isolated part of the code. This is less generic and adds a whole new set of variables associated with it, but changes less of the code others may be using and will be more like an isolated module.

@cbegeman , @vanroekel , @xylar I know I have briefly spoken to you all about this a while ago, but just wondering if you had any stronger feelings, concerns, or suggestions...

vanroekel commented 4 years ago

@katsmith133 if this is for passive scalars, I'd prefer option 1. I don't think anyone is currently using the passive scalar array and could envision a lot of uses for multiple passive scalars that we haven't considered yet. I also can't see how option 1 will interfere with any simulations with a single passive scalar if you can set nscl=1.

xylar commented 4 years ago

@katsmith133, I'll defer to @vanroekel and @cbegeman (who won't likely respond for another week or so). If it were me, I'd also go with 1. I don't think anyone is using s in our group so they likely won't be affected but even if so the impact would be pretty minimal -- just setting adding an extra index wherever needed.

cbegeman commented 4 years ago

@katsmith133, I agree with @xylar and @vanroekel on the benefits of going with option 1 and I don't imagine the changes would affect our simulations. I have to admit I haven't looked too closely into the implementation of passive scalars, but if I think of any additional suggestions I'll let you know. Thanks for asking!