CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   keyword Phi is undefined in dictionary (https://www.cfd-online.com/Forums/openfoam-solving/185580-keyword-phi-undefined-dictionary.html)

Chris2 March 29, 2017 03:52

keyword Phi is undefined in dictionary
 
Hi.

I am running a pipe flow simulation in Simflow and this is my first time. and since it uses Openfoam, I thought that someone who is using OpenFoam can help me with my problem.

When I start running my simulation, it ends unsuccessful. The problem has to do with this "keyword Phi is undefined in dictionary fvsolver".

I checked the file fvsolver, changed some values there but to no avail.

How do I proceed? How do I solve this problem?

Thank you.

agustinvo March 29, 2017 03:57

Hi,

could you post your fvSolution file? The problem is inside of it, but more information is needed to help you

Chris2 March 29, 2017 04:02

Thanks Agustinvo for the reply.

Here it is.

FoamFile
{
version 2.0;
class dictionary;
format ascii;
location "system";
object fvSolution;
}
solvers
{
p
{
smoother GaussSeidel;
relTol 0.1;
cacheAgglomeration true;
maxIter 100;
nPreSweeps 0;
nPostSweeps 1;
nFinalSweeps 0;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
tolerance 1.0E-6;
mergeLevels 1;
solver GAMG;
}
U
{
relTol 0.1;
preconditioner DILU;
tolerance 1.0E-6;
maxIter 100;
solver PBiCG;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 1;
pRefPoint (0.0 0.0 0.0);
pRefValue 10.0;
residualControl
{
p 1.0E-4;
U 1.0E-4;
}
}
relaxationFactors
{
p 0.3;
U 0.7;
}
potentialFlow
{
nNonOrthogonalCorrectors 10;
pRefPoint (0.0 0.0 0.0);
pRefValue 10.0;
}

Chris2 March 29, 2017 04:33

By the way Agustin, I am using the simplefoam for my simulation. I am simulating a flow through a pipe that is connected to a tank. The flow of water out of the tank is also through a pipe that is connected to it.

Mehar March 31, 2017 01:44

Define in fvsolver file as

phi
{
$p;
}



Sent from my LG-F600L using CFD Online Forum mobile app

Chris2 March 31, 2017 02:38

Thanks Sana for the reply. I changed the file, however the problem persists. It is interesting to note that after I change the file and run the Simflow, the fvsolution reverts back to its previous contents, ie, without the
phi
{
$p;
}.


Did I do it correctly when I added the text you mentioned inside solvers?

Mehar March 31, 2017 02:41

In that case....please confirm that file is not replaced during the run....Looks like when you run your simulation...it copies fvsolution file from some other location and replaces the existing file...

Sent from my LG-F600L using CFD Online Forum mobile app

Chris2 March 31, 2017 02:55

Thanks Sana.

I think the file is replaced (the File's time modified changes and coincides with the time of the simulation, not the time of editing) since the changes are not there anymore after I run the simulation.

Mehar March 31, 2017 02:57

Please check your run script...

Sent from my LG-F600L using CFD Online Forum mobile app

Chris2 March 31, 2017 03:04

What do I need to check for in my run script so that the file is not replaced?

Mehar March 31, 2017 03:10

Could u copy ur run script

Sent from my LG-F600L using CFD Online Forum mobile app

Chris2 March 31, 2017 03:13

Thanks Sana for the help. I am running it through Simflow, by the way.

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0+ |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
/* Windows port by SIMFLOW Technologies *\
\*---------------------------------------------------------------------------*/
Build : 3.0+-949e02381429
Exec : C:/Program Files/simFlow/engine-3.0+/bin/potentialFoam -noFunctionObjects -writep
Date : Mar 31 2017
Time : 15:03:18
Host : "DESKTOP-165GQND"
PID : 5792
Case : C:/Users/TRANS-ASIA/Desktop/4/4
nProcs : 1
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


potentialFlow: Operating solver in PISO mode

Reading velocity field U

Constructing pressure field p

Constructing velocity potential field Phi

Creating MRF zone list from MRFProperties

Calculating potential flow


--> FOAM FATAL IO ERROR:
keyword Phi is undefined in dictionary "C:/Users/TRANS-ASIA/Desktop/4/4/system/fvSolution.solvers"

file: C:/Users/TRANS-ASIA/Desktop/4/4/system/fvSolution.solvers from line 13 to line 55.

From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const
in file db/dictionary/dictionary.C at line 640.

FOAM exiting

Mehar March 31, 2017 03:33

I never used OpenFoam with simFlow...what I can guess is that while preparing your case using simFlow...there will be some option to define Phi...

Sent from my LG-F600L using CFD Online Forum mobile app

Metikurke March 15, 2018 17:49

For the future readers this following code works, but you should use Phi instead of phi, and add these in the solvers area of fvSolutions. And thank you Chrismar and Sana for this thread.

Quote:

Originally Posted by Chris2 (Post 643126)
Thanks Sana for the reply. I changed the file, however the problem persists. It is interesting to note that after I change the file and run the Simflow, the fvsolution reverts back to its previous contents, ie, without the
phi
{
$p;
}.


Did I do it correctly when I added the text you mentioned inside solvers?

Regards,

Metikurke


All times are GMT -4. The time now is 16:31.