CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   TimeVaryingUniformFixedValue BC in foam 15 (http://www.cfd-online.com/Forums/openfoam-solving/58633-timevaryinguniformfixedvalue-bc-foam-15-a.html)

nzy102 July 17, 2008 17:32

Hi Guys: I am running foam
 
Hi Guys:

I am running foam 1.5 with a timeVaryingUniformFixedValue BC. Here is the format I used in my bc:

type timeVaryingUniformFixedValue;
fileName "time-series";
boundAction clamp; // (error|warn|clamp|repeat)

i tried both relative path and complete path for the "time-series" file. And the format of the file is consistent with the old version 1.4.1, and it is something like:

{
t0 p0
t1 p1
t2 p2
....
}

when I ran my stuff, I got an error:

================================================== =
Reading transportProperties

Reading field p

Reading field U



keyword outOfBounds is undefined in dictionary "/home/nzy102/OpenFOAM/nzy102-1.5/run/tutorials/icoFoam/pediatric_aorta_4-e_test mesh_pulsatile_resistancenewbc_zeroGradU/0/U::inlet"

file: /home/nzy102/OpenFOAM/nzy102-1.5/run/tutorials/icoFoam/pediatric_aorta_4-e_testm esh_pulsatile_resistancenewbc_zeroGradU/0/U::inlet from line 61 to line 63.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 213.

FOAM exiting
================================================== =

Anybody here has a clue what is wrong?

Thank you.

Ning

olesen July 18, 2008 02:53

Try something like this:
 
Try something like this:

fileName "$FOAM_CASE/time-series";
outOfBounds clamp;

It looks like the docs are slightly out-of-sync.

louisgag July 30, 2008 13:57

Using the openfoam 1.5 package
 
Using the openfoam 1.5 package, I had to manually set the $FOAM_CASE variable before running paraFoam to avoid an error that would cause it to exit before any rendering could be done. (That is in the case of a time varying inlet velocity).

olesen July 31, 2008 02:39

I've reported this and it's al
 
I've reported this and it's already been fixed for the next release.
If you are willing to patch the source a bit, the changes to vtkPV3Foam.C are quite simple:

In the Foam::vtkPV3Foam::vtkPV3Foam constructor
you need these lines:

// avoid argList and get rootPath/caseName directly from the file
fileName fullCasePath(fileName(FileName).path());

if (!dir(fullCasePath))
{
return;
}
if (fullCasePath == ".")
{
fullCasePath = cwd();
}

// Set the case as an environment variable - some BCs might use this
if (fullCasePath.name().find("processor", 0) == 0)
{
setEnv("FOAM_CASE", fullCasePath.path(), true);
}
else
{
setEnv("FOAM_CASE", fullCasePath, true);
}

louisgag July 31, 2008 11:12

Thank you Mark. By adding
 
Thank you Mark.

By adding

// Set the case as an environment variable - some BCs might use this
if (fullCasePath.name().find("processor", 0) == 0)
{
setEnv("FOAM_CASE", fullCasePath.path(), true);
}
else
{
setEnv("FOAM_CASE", fullCasePath, true);
}



after

fileName fullCasePath(fileName(FileName).path());

if (!dir(fullCasePath))
{
return;
}
if (fullCasePath == ".")
{
fullCasePath = cwd();
}



my problem was solved.

woody August 19, 2008 08:08

Hello Guys, Just for comple
 
Hello Guys,

Just for completion of this thread: I tried to restart my simulation with the new Version.
There seemed to be a change in the file Format of the TimeVaryingUniformFixedValue BC, at least for varying velocities. My old file looked like:
(
t1 U1
t2 U2
t3 U3
...
)

The new file has to look like:

(
(t1 (Ux1 Uy1 Uz1))
(t2 (Ux2 Uy2 Uz2))
(t1 (Ux3 Uy3 Uz3))
...
)

Obviously somebody managed to change the Velocitydescription from normal to cartesian...
would be nice if such things are posted somewhere....

Hope this helps anyone who starts with this BC


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