Thank you very much! Still I encounter noticeable mass flow errors (compared with set neumann boundary condition) rising with mesh refinement. Could you have a look at the resulting code? There should be no big changes since the last version.

void massFlow2D(){

ElementVolumeVariables elemVolVars;

FVElementGeometry fvGeometry;

PrimaryVariables flux(0.0);

// loop over elements

for (const auto& element : elements(this->problem_().gridView())) {

if (element.partitionType() != Dune::InteriorEntity)

continue;

fvGeometry.update(this->gridView_(), element);

elemVolVars.update(this->problem_(), element, fvGeometry, false);

// loop over subcontrol volumes

for (int i = 0; i < fvGeometry.numScv; i++) {

if(fvGeometry.subContVol[i].global[0] < 0.01*this->problem_().discretisationSize().first) {

flux += this->localResidual().residual(i);

}}

} // end loop over elements

std::cout << "mass flow through left boundary = " << flux << " [kg/s/m]" << std::endl;

}

Best regards, Gergoe

**********************************************************

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to