|
[Sponsors] |
September 20, 2019, 11:37 |
How to create new incompressible Phi
|
#1 |
Member
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10 |
Hello
I want to calculate new incompressible face flux "phi" based on a different velocity ( named "Ve" ) and use this flux in solving a special equation. So I make a new file "CreatePhie.H" in the solver folder and called it in "createfields.H": Code:
surfaceScalarField phie ( IOobject ( "phie", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(Ve) & mesh.Sf() ); Code:
#include "createPhi.H" #include "createPhie.H" but the results are incorrect!! for testing, I defined "phie" based on velociy "U": Code:
linearInterpolate(U) & mesh.Sf() What's the problem?? and what's the way for definition new flux "phie"?? |
|
June 6, 2022, 06:43 |
|
#2 | |
Member
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 34
Rep Power: 5 |
Quote:
So copy the file to the directory of your new solver, change the name and then compile. Another thing is that you should not change the object identifier "phi" to something of your choice. The reason is that phi is used later in continuityErrors.H to calculate the local and global continuity errors. Keep phi as it is (and do not change it to "phie") in createPhie.H and then try recompiling. This way, both files createPhi.H and createPhie.H will be run by the pre-processor directive and the fluxes will be processed separately by the continuityErrors.H header file. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] OpenFOAM build on Intel Xeon Phi | asaijo | OpenFOAM Installation | 31 | July 26, 2017 10:35 |
Summing phi over all faces in patch | NewtoFOAM | OpenFOAM Programming & Development | 2 | May 8, 2013 05:37 |
Recreation of phi file, icoFoam | Madeleine P. Vincent | OpenFOAM Running, Solving & CFD | 0 | May 7, 2012 11:17 |
Actuator disk model | audrich | FLUENT | 0 | September 21, 2009 07:06 |
Where's the singularity/mesh flaw? | audrich | FLUENT | 3 | August 4, 2009 01:07 |