CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Changing Viscosity in solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2021, 00:53
Default Changing Viscosity in solver
  #1
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 281
Rep Power: 12
mostanad is on a distinguished road
Hi all,
I am working on the viscosity value in a multiphase solver. Due to some modifications, I need to change the viscosity value in the solver using a function in my defined class. So I used the following line to access the viscosity and change it.
Code:
volScalarField k_viscosity = turbulence->nu();
particleCloud.setParticleViscosity(k_viscosity);
However, by these lines, only the k_viscosity value is changed using call by reference in setParticleViscosity function. So how can give the modified k_viscosity to nu? I think that's a big question I couldn't find its answer.
Cheers,

Mohammad
mostanad is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
loading issue libraries:libsimpleFunctionObjects.so libsimpleSwakFunctionObjects.so immortality OpenFOAM Pre-Processing 15 April 7, 2024 13:35
PEMFC model with FLUENT brahimchoice FLUENT 22 April 19, 2020 16:44
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 08:18
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08


All times are GMT -4. The time now is 01:37.