
[Sponsors] 
September 22, 2015, 03:05 
Solver RunTime Value Output

#1 
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 6 
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 quasisteadiness 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, 10:52 

#2 
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Brussels
Posts: 187
Rep Power: 7 
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, 02:43 

#3  
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 6 
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 xzplane 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, 07:53 

#4  
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Brussels
Posts: 187
Rep Power: 7 
Quote:
Quote:
In all these cases, you have to select the correct term in the tensor you obtain. 

September 23, 2015, 11:23 

#5 
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 6 

September 25, 2015, 09:56 
U.mesh.C() coordinates?

#6 
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 6 
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 12:37. 

September 25, 2015, 16:37 
Correlate velocities and yposition of cell centers

#7 
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 6 
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! 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Behaviour of the kOmegaSST in a steadystate case  Max1234  OpenFOAM Running, Solving & CFD  15  July 2, 2015 06:38 
Contribution a new utility: refine wall layer mesh based on yPlus field  lakeat  OpenFOAM Mesh Utilities  57  February 1, 2015 09:25 
Moving mesh  Niklas Wikstrom (Wikstrom)  OpenFOAM Running, Solving & CFD  122  June 15, 2014 06:20 
Flow Solver: Run time error  Son_Goku  NUMECA  1  February 6, 2014 04:33 
lift and drag on ship superstructures  vaina74  OpenFOAM Running, Solving & CFD  3  June 8, 2010 12:30 