Hi, I'm trying to to set fi
I'm trying to to set fixedvalue/zerogradient depending on an arbitrary direction considered (surfaceScalarField S) and not on the phi direction (as inletOutlet goes)...
How can I say to Foam to take S in stead of phi?
thanks in advance, Matteo
Add an entry in your inlet out
Add an entry in your inlet outlet condition using the keyword phi to specify which field you wish to use as the flux. Thus:
value uniform 0;
inletValue uniform 1;
thanks a lot, Hrvoje best r
thanks a lot, Hrvoje
best regards, Matteo
Sorry, an other problem ari
an other problem arises!
My code needs to update boundary values after the initialization! (iterative procedure within a single time step)
"fixedValue type" allows to overwrite boundary values and solve for the fvMatrix with the new ones, instead of those set in the "0/*" file.
setting "inletOutlet type", as suggested, even if the code updates boundary values before instancianting the fvMatrix, it seems not to use the updated values, but only the "olds" set in the "0/" file!!
I hope u'll understand the problem...
thanks in advance,
Hi Matteo, just read your t
just read your thread. If have encountered the same problem. Did you by chance find a solution and if so, would you like to share it?
Thanks in advance.
I'm trying to change the initial conditions of the cavity model in tutorials and use icoFoam solver. within the velocity file i'm changing both movingwalls type and fixedwalls type to inletOutlet (originally fixedValue) and icoFoam is crashing saying that it is undefined. here is the error message,
Reading field U
--> FOAM FATAL IO ERROR:
keyword inletValue is undefined in dictionary "./case2/0/U::boundaryField::movingWall"
file: ./case2/0/U::boundaryField::movingWall from line 25 to line 26.
From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 395.
Can you help me?
The keyword inletValue is undefined in your 0/U file on the movingWall patch.
The error message is quite clear about that.
i assume you messed the definition for the patch movingwall and forgot to set the actual value for the inlet.
Should be smth like
inletValue uniform(1 0 0);
And btw. itīs pretty rude to post stuff multiple times asking the same and without regarding to the topic.
Just open a thread on you own topic.
i want to simulate a simple quadratic chamber with one inlet and two possible outlets. While the inflow is constant during the simulation, i want to switch between both outlets periodically.
That means, i have to switch my type of boundary condition for U at the outlets during my simulation between "zeroGradient" (outlet is open) and "fixedValue (= 0,0,0)" (outlet is closed).
I've been reading the post of Matteo about switching between zeroGradient/ fixedValue based on an arbitrary surfaceScalarField (eg. S) by using the inletOutlet Boundary condition.
So i specified the inletOutlet-BC for U and outletInlet-BC for p at the outlets, dependent on S.
Also I implemented into my code to switched S at the outlet boundarys between -1 and 1.
This is the point, were i am not sure if it is correct.
How does the inletOutlet boundary condition really work? Is it correct, that it will set the boundary to zeroGradient, if the flow goes out of the boundary? And does this mean, that the value of the flow field (eg. S or Phi) at this boundary is positive?
And if the flow field is negative, does the boundary condition switch to fixedValue?
The way, i implemented this (by switching S between -1 and 1) does not really close the outlet for S=-1 and open it for S=1 respectively. But it seams to have an influence on the Velocity at the boundary (compared to not manipulated boundaries).
So is it wrong to simply set the values for S to -1 or 1 respectively? Which values would make sense?
Is there another approach to "open" and "close" an outlet during the simulation without using the inletOutlet-BC?
thanks in advance for any help,
|All times are GMT -4. The time now is 05:11.|