View Issue Details

IDProjectCategoryView StatusLast Update
0004190OpenFOAMPatchpublic2024-12-17 14:43
Reportertniemi Assigned Tohenry  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0004190: Fix for multiphase support of specieFlux
DescriptionThe specieFlux function object can't be currently used with multiphaseEuler, because the specie name must be given with a group name, such as

#includeFunc specieFlux(H2O.gas)

in order to detect that it should operate on gas thermo / thermophysicalTranport. However, when asking from thermo, it does not remove the group-part and thus
results in not found error.

I have attached a trivial fix for this.
Steps To ReproduceTake eg. tutorials/multiphaseEuler/bubbleColumnEvaporating and add functions-file with

#includeFunc specieFlux(H2O)
or
#includeFunc specieFlux(H2O.gas)

and change to writeNow;

The former gives
--> FOAM Warning : functionObjects::specieFlux specieFlux(H2O) failed to execute.

and the latter

--> FOAM FATAL ERROR:
H2O.gas not found in table. Valid entries:
2
(
air
H2O
)
TagsNo tags attached.

Activities

tniemi

2024-12-17 13:03

reporter  

specieflux.diff (623 bytes)   
diff --git a/src/functionObjects/field/specieFlux/specieFlux.C b/src/functionObjects/field/specieFlux/specieFlux.C
index c893e64a99..2f6017881e 100644
--- a/src/functionObjects/field/specieFlux/specieFlux.C
+++ b/src/functionObjects/field/specieFlux/specieFlux.C
@@ -80,7 +80,7 @@ bool Foam::functionObjects::specieFluxBase::calc()
     const fluidThermophysicalTransportModel& ttm =
         lookupObject<fluidThermophysicalTransportModel>(ttmName);
 
-    const volScalarField& Yi = thermo.Y(fieldName_);
+    const volScalarField& Yi = thermo.Y(IOobject::member(fieldName_));
 
     store(resultName_, calc(ttm, Yi));
 
specieflux.diff (623 bytes)   

henry

2024-12-17 14:43

manager   ~0013488

Resolved by commit a03fe2950532963c7ec17ece5b7c247fdebd0a4a

Issue History

Date Modified Username Field Change
2024-12-17 13:03 tniemi New Issue
2024-12-17 13:03 tniemi File Added: specieflux.diff
2024-12-17 14:43 henry Assigned To => henry
2024-12-17 14:43 henry Status new => resolved
2024-12-17 14:43 henry Resolution open => fixed
2024-12-17 14:43 henry Fixed in Version => dev
2024-12-17 14:43 henry Note Added: 0013488