|
[Sponsors] |
March 3, 2021, 01:36 |
Changing Viscosity in solver
|
#1 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 281
Rep Power: 12 |
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 |
|
March 3, 2021, 18:55 |
|
#2 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 281
Rep Power: 12 |
So interesting nobody knows the answer!
|
|
March 3, 2021, 21:28 |
|
#3 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 281
Rep Power: 12 |
Finally solved the problem by myself using a function, correctnu, like correct(), to update the viscosity in each time step.
|
|
Tags |
class, coding, development, viscosity, volscalarfield |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
UDF for changing viscosity | Rafael | FLUENT | 2 | October 28, 2009 16:59 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 15:08 |