|
[Sponsors] |
How to output the turbulent model's coefficient |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 9, 2020, 07:03 |
How to output the turbulent model's coefficient
|
#1 |
New Member
王子阳
Join Date: Aug 2019
Posts: 29
Rep Power: 7 |
i recently use the dynamic Smagorisky model to simulate the cavitation, i want to output the turbulent models coefficent "cD" to a file, what code should i make ?
the the dynamic Smagorisky model.C program of cD is as follows [/{ // The SGS viscosity is bounded so that nuEff cannot become negative. // Values are limited here, and not in nuEff, for consistency in stored // data and in submodels using nuSgs(). // No warning message is printed when this limitation is applied. nuSgs_ = max(cD(D)*sqr(delta())*sqrt(magSqr(D)), -nu()); nuSgs_.correctBoundaryConditions(); } volScalarField dynamicSmagorinsky::cD ( const volSymmTensorField& D ) const { tmp<volSymmTensorField> LL = dev(filter_(sqr(U())) - (sqr(filter_(U()))));//sqr returns the outer product of U, the deviatoric part is explicitly expressed, while the isotropic part is in the pressure term const volSymmTensorField MM ( sqr(delta())*(filter_(mag(D)*(D)) - 4*mag(filter_(D))*filter_(D)) ); // Locally averaging MMMM on cell faces volScalarField MMMM = fvc::average(magSqr(MM)); MMMM.max(VSMALL); // Performing local avera[/CODE]ge on cell faces on return return 0.5*fvc::average(LL && MM)/MMMM; // cD expression }] |
|
February 9, 2020, 12:53 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Since `cD` seems to be registered to the mesh, I think adding:
cD.write(); somewhere in your code? Then `cD` could be written out like `U`? Or if you execute in a single processor: Info<< cD << endl; // I wouldn't use this though.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
Tags |
output coefficient |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergent-Divergent nozzle Turbulent Models Problems | rafiktharwat | FLUENT | 0 | April 11, 2015 12:24 |
Difficulty In Setting Boundary Conditions | Moinul Haque | CFX | 4 | November 25, 2014 18:30 |
particle tracking | sakurabogoda | CFX | 7 | December 5, 2013 00:12 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |