# How to output the turbulent model's coefficient

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 9, 2020, 07:03 How to output the turbulent model's coefficient #1 New Member   王子阳 Join Date: Aug 2019 Posts: 11 Rep Power: 2 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 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 Posts: 298 Rep Power: 3 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. __________________ Kind regards, HPE The OpenFOAM community is the biggest contributor to OpenFOAM; not person A or B. Let's report bugs or issue feature requests in GitLab-OpenFOAM. Please `design` your questions well. Such effort always pays off well for inquirers and `helpmate`s: How to create a Minimal, Reproducible Example, How to give enough info to get help.

 Tags output coefficient

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post rafiktharwat FLUENT 0 April 11, 2015 12:24 Moinul Haque CFX 4 November 25, 2014 18:30 sakurabogoda CFX 7 December 5, 2013 00:12 Anna Tian CFX 1 June 16, 2013 07:28 cuteapathy CFX 14 March 20, 2012 07:45

All times are GMT -4. The time now is 10:04.

 Contact Us - CFD Online - Privacy Statement - Top