SCO2 MODE boundary “Missing dof” error with RATE MASS_RATE

12 views
Skip to first unread message

Syed Hassan Ahmed

unread,
Mar 10, 2026, 3:09:10 PM (9 days ago) Mar 10
to pflotran-users

Dear PFLOTRAN developers and users,

I am a graduate student using the development version of PFLOTRAN for supercritical CO₂ (SCO2) flow with reactive transport, and I am encountering a persistent boundary-condition error that I cannot resolve from the documentation.

My setup:

  • SIMULATION_TYPE SUBSURFACE

  • SUBSURFACE_FLOW: MODE SCO2 with ISOTHERMAL_TEMPERATURE

  • SUBSURFACE_TRANSPORT: MODE GIRT with aqueous chemistry and mineral kinetics

  • Simple 1D structured grid (100 × 1 × 1), fully active cells

  • Two boundaries: west (injection) and east (production)

What I am trying to do:

  • Implement rate-controlled injection and production in SCO2 mode using
    FLOW_CONDITION with TYPE ... RATE MASS_RATE (as described in the FLOW_CONDITION / SCO2 documentation).

  • I have tried both:

    • Full “aqueous state” plus rate, and

    • Minimal rate-only and rate+pressure combinations.

Examples of FLOW_CONDITIONs I tried (and which all trigger the same error):

  1. Full aqueous state + rate:

text
FLOW_CONDITION inj TYPE RATE MASS_RATE LIQUID_PRESSURE DIRICHLET CO2_MASS_FRACTION DIRICHLET SALT_MASS_FRACTION DIRICHLET TEMPERATURE DIRICHLET / RATE 9.20d-1 0.d0 0.d0 kg/s LIQUID_PRESSURE 1.70d7 CO2_MASS_FRACTION 1.d-2 SALT_MASS_FRACTION 0.05d0 TEMPERATURE 50.d0 END
  1. Minimal, rate-only:

text
FLOW_CONDITION inj TYPE RATE MASS_RATE / RATE 9.20d-1 0.d0 0.d0 kg/s END

I pair these with:

text
BOUNDARY_CONDITION inj_bc FLOW_CONDITION inj TRANSPORT_CONDITION injection REGION west END

and similarly for a production boundary with a negative rate.

The error:

The input parses, grid is reported correctly, and then the run stops with:

text
ERROR: Error with SCO2_MODE phase boundary condition: Missing dof. Stopping!

This happens for any SCO2 FLOW_CONDITION that contains RATE MASS_RATE and is used in a BOUNDARY_CONDITION, even when it is the only TYPE entry. When I remove RATE and use only Dirichlet pressure/composition (pure “aqueous state”), the simulation runs fine.

What I have checked:

  • I have carefully followed the SCO2 FLOW_CONDITION TYPE specification, including the “Initial thermodynamic states for combinations of Dirichlet-based conditions” for Aqueous/Gas/Gas–Aqueous/Trapped Gas.

  • I have tested combinations that match exactly:
    LIQUID_PRESSURE + CO2_MASS_FRACTION (MASS_FRACTION) + SALT_MASS_FRACTION + TEMPERATURE for the aqueous state, without RATE.

  • Those Dirichlet-only SCO2 boundaries work, but any use of RATE MASS_RATE in SCO2 mode immediately triggers the “Missing dof” error.

My questions:

  1. Is RATE MASS_RATE actually supported in SCO2 mode in the development version I am using, or is it documented but not yet implemented/fully enabled for SCO2?

  2. If it is supported, could you please provide a small working example input snippet (FLOW_CONDITION + BOUNDARY_CONDITION) showing a valid SCO2 rate-controlled boundary?

  3. If it is not currently supported, is the recommended workaround to:

    • Use only Dirichlet pressure-based SCO2 boundaries and tune the pressure difference to approximate a constant rate?

    • Or is there another preferred way to impose rate control for SCO2 wells?

I can provide my minimal 1D input file if helpful, but the key behavior is that any FLOW_CONDITION with TYPE ... RATE MASS_RATE used in a BOUNDARY_CONDITION in SCO2 mode yields Error with SCO2_MODE phase boundary condition: Missing dof, while the same problem with pure pressure-based SCO2 BCs runs without issues.

Thank you very much for your time and for maintaining PFLOTRAN. Any guidance or a small working SCO2 example with RATE MASS_RATE would be greatly appreciated.

Best regards,
Hassan

Michael Nole

unread,
Mar 10, 2026, 3:29:10 PM (9 days ago) Mar 10
to pflotra...@googlegroups.com
Hassan,

RATE MASS_RATE should work. It seems like it might be expecting a thermal constraint in that rate (i.e., it thinks you are not using the isothermal version), so I would first double check how you are setting ISOTHERMAL_TEMPERATURE <double> and make sure that is correct. Then compare your setup to the short course example problems in pflotran/shortcourse/exercises/co2/sco2. Those have examples that use RATE MASS_RATE and have coupling to chemistry. Feel free to send your input deck along if you’re still stuck.

Michael

--
You received this message because you are subscribed to the Google Groups "pflotran-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pflotran-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pflotran-users/a721d7cc-7c91-436f-8f1f-d73ccdf98f64n%40googlegroups.com.

Syed Hassan Ahmed

unread,
Mar 11, 2026, 5:45:14 PM (8 days ago) Mar 11
to pflotra...@googlegroups.com
Michael,

Thankyou for your quick response.
I am still stuck in it. Here is my code. Kindly solve the problem as soon as possible.

Thank you
Hassan

You received this message because you are subscribed to a topic in the Google Groups "pflotran-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pflotran-users/1lrpRsJIBg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pflotran-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pflotran-users/82A33636-9919-4986-8BD6-D7DB6AB72DFF%40gmail.com.
E.in

Michael Nole

unread,
Mar 11, 2026, 7:43:33 PM (8 days ago) Mar 11
to pflotra...@googlegroups.com
Hassan,

It looks like you are applying a FLOW_CONDITION with a RATE as BOUNDARY_CONDITION. Instead, apply it as SOURCE_SINK to the inside of the domain. BOUNDARY_CONDITIONs accept either DIRICHLET or NEUMANN conditions, whereas SOURCE_SINKs accept RATEs.

Michael

Syed Hassan Ahmed

unread,
Mar 12, 2026, 7:27:10 PM (7 days ago) Mar 12
to pflotra...@googlegroups.com

Dear Michael,

Thank you again for your guidance earlier.

I was able to get the model running, but currently the wells are being controlled by pressure rather than by a fixed injection/production rate. My goal is to inject and produce using a fixed mass rate.

I tried implementing the RATE MASS_RATE option with SOURCE_SINK, but I kept encountering the same “missing DOF” error and couldn’t resolve it. I believe I may still be missing something in the flow condition setup.

Would you be able to help modify the input file so the injector and producer operate at fixed rates instead of pressure control? I’ve been stuck on this for a while and would really appreciate your help.

Thank you very much for your time.

Best regards,
Hassan


D 1.in
Reply all
Reply to author
Forward
0 new messages