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

Create vector from cell center to cell vertex

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 12, 2021, 06:22
Default Create vector from cell center to cell vertex
  #1
Member
 
Daniel
Join Date: May 2018
Posts: 43
Rep Power: 7
CFDanielGER is on a distinguished road
Hello everybody,

for a new hybrid turbulence model I want to code a new subgrid length scale delta where delta is defined as follows:

delta = (1 / sqrt(3)) * max | (I_n - I_m) | where n,m = 1,8 and stand for the vertices of a cell.

I_n is defined as follows and is the cross product of the vorticity vector and the vector from the cell center to the cell vertex:

I_n = n x r_n

Now I am looking for an efficient way of defining the new subgrid length scale. Since the vectors of the cell center to the cell vertices are constant I thought about saving them in a list in the createFields part and then call them in the solver. But I don't know how to realize it yet why I am asking you for your help. How do you think could the code be implemented and be structured? I am looking forward for your help. If you need additional information please let me know.

Many thanks and best regards,
Daniel

CFDanielGER is offline   Reply With Quote

 


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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
UDF in case with DPM modle POSTHU Fluent UDF and Scheme Programming 0 March 3, 2021 07:21
[blockMesh] --> foam fatal error: lillo763 OpenFOAM Meshing & Mesh Conversion 0 March 5, 2014 10:27
Actuator disk model audrich FLUENT 0 September 21, 2009 07:06
Warning 097- AB Siemens 6 November 15, 2004 04:41


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