GENERAL mode diffusion conditional question

88 views
Skip to first unread message

David Fukuyama

unread,
Jan 4, 2024, 2:58:06 PMJan 4
to pflotran-dev
I am curious about a conditional in the GeneralFlux subroutine that computes liquid and gas diffusion. On lines 1524 and 1946, there is the following conditional:
if (sqrt(sat_up*sat_dn) > eps) then

As far as I can tell, this conditional just checks that the two adjacent cells have a non-zero value (or slightly above zero). Is there a reason why this is done rather than just checking that sat_up > eps and sat_dn > eps?

Thanks,
David

Hammond, Glenn E

unread,
Jan 4, 2024, 6:53:19 PMJan 4
to pflotr...@googlegroups.com

David,

 

I believe that “if (sqrt(sat_up*sat_dn) > eps) then” was the original code, but I wanted to have the option to allow for diffusion even when a phase does not exist. Therefore, I added the alternative “if (sat_up > eps .or. sat_dn > eps) then”. As you well know, “if (sqrt(sat_up*sat_dn) > eps) then” is similar to “if (sat_up > eps .and. sat_dn > eps) then”, but instead a geometric mean when it comes to the comparison to epsilon.

 

Glenn

 

From: 'David Fukuyama' via pflotran-dev <pflotr...@googlegroups.com>
Sent: Thursday, January 4, 2024 11:58 AM
To: pflotran-dev <pflotr...@googlegroups.com>
Subject: [pflotran-dev: 6226] GENERAL mode diffusion conditional question

 

Check twice before you click! This email originated from outside PNNL.

 

--
You received this message because you are subscribed to the Google Groups "pflotran-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pflotran-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pflotran-dev/8448ddee-8202-48a9-ac86-ecb45126f832n%40googlegroups.com.

Fukuyama, David Erik

unread,
Jan 5, 2024, 12:20:45 PMJan 5
to pflotr...@googlegroups.com

Thanks Glenn. Are there any special cases that the geometric mean catches that the other conditional would not?

 

From: 'Hammond, Glenn E' via pflotran-dev <pflotr...@googlegroups.com>
Date: Thursday, January 4, 2024 at 3:54 PM
To: pflotr...@googlegroups.com <pflotr...@googlegroups.com>
Subject: [EXTERNAL] RE: [pflotran-dev: 6226] GENERAL mode diffusion conditional question

pflotr...@googlegroups.com appears similar to someone who previously sent you email, but may not be that person. Learn why this could be a risk

Reply all
Reply to author
Forward
0 new messages