Skip to content

Conversation

@GiudGiud
Copy link
Contributor

@GiudGiud GiudGiud commented Nov 6, 2025

Bunch of missing routines, enough to be using the 1 phase pipe flow model at least
EDIT: and the volume junction now. So it should be nearly all we need for regular use, and we are within striking distance if a new object comes up!

Also added:

  • additional checks on input variables (consistent across the entire object now)
  • more AD support. The "capping" of input variables does not play well with our use of "const ADReal &" but I think the capping (for robustness) is more important than performance right now, so I made copies of the ADReal inputs
  • more unit testing, covering previously uncovered routines
  • deprecated 'fp' and added a workaround as THM simulations love having 'fp' in GlobalParams and 'fp = my_name' does not work for TFP
  • widely buffed the ability to do partial passthrough, e.g. interpolating some quantities and using an 'input_fp' for others. It's well tested now, and you can pass-through a tabulated property (previously would not let you)

@licharlot in case you want to keep following TFPs

@GiudGiud GiudGiud self-assigned this Nov 6, 2025
@GiudGiud GiudGiud changed the title Add some support for using (v,e) interpolation tables in THM Add support for using (v,e) interpolation tables in THM Nov 11, 2025
@GiudGiud
Copy link
Contributor Author

Worked on adding support for a volume junction, so this should be enough for general use in THM now.
Bunch of (p, s), (p, h) etc calls work now

@GiudGiud GiudGiud marked this pull request as ready for review November 11, 2025 21:04
With this we can initialze a THM flow channel 1 phase
refs idaholab#20101
- add the p/T from v e with derivatives and AD derivatives to be able to do a Newton solve with AD
refs idaholab#20101
- requires T_from_p_rho and e_from_p_T with AD for pT tabulations
refs idaholab#20101
- use parameter tolerance
- use parameter number of iterations
…he input file

- also the current iterate and targets
- mention two options: interpolated properties with specific name
                       fp object
to enable using volume junctions
- use newton on getting rho=1/v, then newton again to get e by inverting T(v,e)
to use TFP with volume junction
When using (p,T) previously, s_from_v_e ended up computed through a p_T_from_v_e call
to satisfy the p_from_h_s call in volume junction
to enable use of v e tabuluations with volume junctions
…erties (consistency)

Use the FP uo preferentially for computing grids
@GiudGiud GiudGiud force-pushed the PR_fp_thm_ve branch 3 times, most recently from fd862a6 to 76fa2d6 Compare November 12, 2025 00:25
@moosebuild
Copy link
Contributor

moosebuild commented Nov 12, 2025

Job Documentation, step Docs: sync website on 470fc75 wanted to post the following:

View the site here

This comment will be updated on new commits.

@GiudGiud GiudGiud requested a review from cpgr as a code owner November 12, 2025 23:10
- enable when not using (p,T)->(v,e) conversion
- avoid the header to be able to use for gold files
- avoid a lone comma when not outputting any extra properties
- avoid conversion errors with h(p,T) call
Add a  dedicated test for (p,T) output
- try to guess when newton is used for initial guess checks
initialize FP earlier & use the tabulation rather than the FP
…y sepecifying the

interpolated properties in the input
- address porous flow failure that was relying on forwarding a property
@moosebuild
Copy link
Contributor

moosebuild commented Nov 13, 2025

Job Coverage, step Generate coverage on 470fc75 wanted to post the following:

Framework coverage

Coverage did not change

Modules coverage

Fluid properties

b79a48 #31860 470fc7
Total Total +/- New
Rate 85.95% 86.08% +0.13% 100.00%
Hits 8195 8466 +271 455
Misses 1340 1369 +29 0

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

Make sure to initialize (v,e) grid for passthrough case
Add testing for (v,e) passthrough
- create a dedicated passthrough tabulation
- use idg fps that have the most AD definitions created
…e FP

- otherwise we would compute min/max from FP calls OOB from the tabulation
- then flush to min/max that could be OOB
- T/p from v e with derivatives in the passthrough _fp case
- AD e and v from p T
- e from p rho using a pT tabulation
- AD s from v e
- T from p rho using a ve tabulation
@moosebuild
Copy link
Contributor

Job Test, step Results summary on 470fc75 wanted to post the following:

Framework test summary

Compared against b79a48d in job civet.inl.gov/job/3380566.

No change

Modules test summary

Compared against b79a48d in job civet.inl.gov/job/3380566.

Added tests

Test Time (s)
fluid_properties/test:tabulated.file_writing/pT 1.01

Run time changes

Test Base (s) Head (s) +/-
porous_flow/test:fluidstate.theis_tabulated 7.50 3.32 -55.79%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants