|
[Sponsors] |
September 22, 2015, 04:05 |
Solver Run-Time Value Output
|
#1 |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
I am in the process of developing a custom solver based off of the icoFoam solver. I would like to output a value, after each time step, based off the following:
Currently, I am judging quasi-steadiness of turbulent flow based off of the velocity of a probed location at the center of the mesh. However, being able to output this value would give me more information before having to do any post processing. If anyone could help, I would appreciate it. Thanks. |
|
September 22, 2015, 11:52 |
|
#2 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi,
I think you can use a "probe function", and each time you write the data, a file will be created. If you want to see it in the terminal, you just include a line like: Code:
Info << "my variable" << my_variable << endl; |
|
September 23, 2015, 03:43 |
|
#3 | |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
Quote:
The crux of my problem is that I am unsure of how to obtain the velocity field values, within the solver, that are required to solve this equation. I think that if I can figure that out, I will have my problem whipped . Specifically, I need to be able to (if I am interpreting the equation correctly) - obtain all instantaneous u and v velocity components, multiply them, and average the products for the first term. (Reynolds stress) - obtain an average of the u component of velocity across each mesh xz-plane and find the derivative with respect to y, for the last term. - Calculate the Reynolds number, which should be an easy task once I figure out how to do the above two tasks. Sorry, I probably should have included these details before. |
||
September 23, 2015, 08:53 |
|
#4 | ||
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Quote:
Quote:
In all these cases, you have to select the correct term in the tensor you obtain. |
|||
September 23, 2015, 12:23 |
|
#5 |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
||
September 25, 2015, 10:56 |
U.mesh.C() coordinates?
|
#6 |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
Ok, so I think I can get all of the information I need from
Code:
U.mesh.C() EDIT: Does "U.mesh.C()" return cell center coordinates or velocities? Perhaps "U.mesh.C().component()" returns cell center coordinate in a particular direction and "U.mesh.C().internalField()" returns the velocity values at the cell centers? Last edited by fatirishman53; September 25, 2015 at 13:37. |
|
September 25, 2015, 17:37 |
Correlate velocities and y-position of cell centers
|
#7 |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
Here is what I have figured out so far:
For cell center positions: Code:
const vectorField centers = u.mesh().C().internalField(); Code:
scalarField velocityX = U.internalField() BTW, I am completely aware that I may be going about this completely wrong. Any help would be much appreciated! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
Behaviour of the kOmegaSST in a steady-state case | Max1234 | OpenFOAM Running, Solving & CFD | 18 | October 31, 2018 09:03 |
Flow Solver: Run time error | Son_Goku | Fidelity CFD | 2 | August 21, 2018 10:21 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
lift and drag on ship superstructures | vaina74 | OpenFOAM Running, Solving & CFD | 3 | June 8, 2010 13:30 |