CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   BC in openFoam (https://www.cfd-online.com/Forums/openfoam/79381-bc-openfoam.html)

nimasam August 22, 2010 16:24

BC in openFoam
 
hi dear foamer
how i can use a value in a file as my boundary condition ?
for example for patch inlet for pressure i want that boundary in inlet change as i change the value of pSat in constant directory transporperties file:
inlet {
type fixedValue;
value $FOAM_CASE/constant/transporperties/pSat;
}

djpiro August 23, 2010 15:12

Quote:

Originally Posted by nimasam (Post 272297)
hi dear foamer
how i can use a value in a file as my boundary condition ?
for example for patch inlet for pressure i want that boundary in inlet change as i change the value of pSat in constant directory transporperties file:
inlet {
type fixedValue;
value $FOAM_CASE/constant/transporperties/pSat;
}

Hello,

I have made a few of my own BC's in foam that read in data from files. You can use input file streams (IFStream class) to read in files. I got the original code I use from $FOAM_SRC/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C, so I suggest that as a starting point. I do not know if this would be the most ideal option for you, but I'm sure you could get it to work.

I hope this helps,

Dominic

aloeven August 25, 2010 02:43

Did you take a look at the user manual section 4.2.9?

There it is exactly explained how to use a value from a file. For an example, take a look at the motorBike tutorial of simpleFoam.

nimasam August 29, 2010 21:45

yep u are right but i would like to read a value from an existing dic for example transportproperties dic not from a file in directory 0

rob3rt 0ng August 29, 2010 23:41

Hi Nima,

Just a wild guess, I think you need a boundary data file like the one in pimpleFoam. Or you can input some forAll and if else command directly in your solver...

Regards,
Robert

bruxellois4 September 1, 2010 17:47

Dear Foamer!!

how i can define a variable (non constant) boundary condition (pressure inlet),for example for patch total pressure i want that boundary in inlet changes at every iteration step, i have value in files which come from real test.

Any idea please!


Best regards.

rob3rt 0ng September 1, 2010 23:29

Hi Abdel,

Please find this discussion
http://www.cfd-online.com/Forums/ope...onditions.html

Otherwise, if the properties you want to vary with time is not a volScalarField (NO_READ in createFields.H) then you can do based from my previous post.

Regards,
Robert

deifobe October 28, 2011 18:48

continuity BC
 
hi,
I am new to OpenFoam, does anybody know how to set a continuity BC in OpenFOAM?
Thanks in advance

nimasam October 29, 2011 03:54

where do u need continuity boundary condition?
which solver do u talking about and which variables?

deifobe October 30, 2011 09:54

thanks for reply, i use interFoam to simulate the droplet break-up in a t-junction
and i need continuity BC(for pressure,velocity and alpha1) for the patch between vertical and horizontal arm because i tried to merge (with mergePathPairs) the two blocks but the simulation result not is what is expected: changing several BC i obtain that the fluid stop at this patch or a continuous flow.

nimasam October 30, 2011 11:29

are you sure your problem is the boundary condition between horizontal and vertical patches? i think you have done the right work yet and using merge patches to merge two blocks i think its better to open a new thread and put some of ur result and what you are expecting from result in it! different issues from mesh resolution or solver limitation or overall conditions or initial conditions cause your problem! and it think here the patch issue is not ur problem

deifobe November 2, 2011 23:00

Ok,thanks a lot for your advice

subhsngh July 6, 2013 16:35

hi,
can u tell me how to write partial velocity differential condition for outlet


All times are GMT -4. The time now is 14:07.