CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to compute Phi field having U (OFv6)

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2019, 11:43
Default How to compute Phi field having U (OFv6)
New Member
Join Date: Jul 2019
Posts: 3
Rep Power: 6
oobiols is on a distinguished road
Dear OpenFOAMers,

I am using Openfoam-v6 and I want to solve a simple benchmark, let's say, laminar flow around a cylinder (Re~50).
The thing is that I want to give it my own initial condition. In the 0 folder, I would use a customized U field. How can I tell OpenFOAM to compute the phi scalar field from this U vector field? It should be possible because I have U and the mesh is correctly created using blockMesh. For future iterations, phi is computed and shows up in the timesteps folders, but not for the 0 folder. Any ideas?

I know that the SIMPLE algorithm, for instance, computes phi as :

phi = flux(U)

In older versions of OF, it is computed as:

phi = linearInterpolate(U) & mesh.Sf()

Is it possible to add this as a function object or a function in the controlDict? How?

I have tried to compile my own custom function object to get it but I am not being succesful. I am using the OF docker. Thank you very much!
oobiols is offline   Reply With Quote

Old   July 31, 2019, 17:26
New Member
Join Date: Jul 2019
Posts: 3
Rep Power: 6
oobiols is on a distinguished road
Actually, I can make the question more general:

- How to compute the phi field from a U field given by me?

Thanks a lot.
oobiols is offline   Reply With Quote


custom defined function, function objects, phi field

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
''unknown radialModelType type Gidaspow'' PROBLEM WITH THE BED TUTORIAL AndoniBM OpenFOAM Running, Solving & CFD 2 March 25, 2015 19:44
field functions - table crevoise STAR-CCM+ 3 March 26, 2013 10:37
Field functions and table crevoise Siemens 0 March 20, 2013 11:51
Accessing phi field for sampling plane francesco85 OpenFOAM Post-Processing 1 August 5, 2011 06:49
To compute Average flowfield with oodles flying OpenFOAM Running, Solving & CFD 3 May 5, 2009 09:46

All times are GMT -4. The time now is 20:06.