|
[Sponsors] |
Write a calculated variable to postProcessing |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 29, 2021, 14:22 |
|
#21 |
Member
Vitor Monteiro
Join Date: Nov 2020
Posts: 32
Rep Power: 6 |
The code was exactly this one I was using later. But instead it was implemented at the multiphaseEulerFoam.C file and recompiled again.
Code:
forAll(fluid.multiComponentPhases(), multiComponentPhasei) // fases { phaseModel& phase = fluid.multiComponentPhases()[multiComponentPhasei]; UPtrList<volScalarField>& Y = phase.YActiveRef(); const volScalarField& alpha = phase; const volScalarField& rho = phase.rho(); const scalarField& v = mesh().V(); forAll(Y, i) // espécies { const double& m = gSum(alpha*rho*v); outputFilePtr() << mesh().time().timeName() << " " << Y[i].name() << " " << m << endl; Info<< "coded totalMass output:" << endl << " name: " << Y[i].name() << endl << " mass: " << m << endl << endl; }; // fim for }; //fim for |
|
Tags |
coded functions, gsum(), integration, postprocessing, write to file |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 14:06 |
Condensation as an additional variable | Clark Griswold | CFX | 2 | April 21, 2012 08:20 |
Additional variable as output of an expression | Chander | CFX | 1 | November 22, 2011 13:54 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 05:35 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |