- **OpenFOAM Programming & Development**
(*http://www.cfd-online.com/Forums/openfoam-programming-development/*)

- - **Put "calculated" boundary condition**
(*http://www.cfd-online.com/Forums/openfoam-programming-development/73813-put-calculated-boundary-condition.html*)

Put "calculated" boundary conditionHi everyone,
I'm new user in OpenFoam and I need to solve a problem where I have to use a "calculated" boundary condition and I would like to know how I do this. Could somebody help me? Thank your kind attention. |

Quote:
A function depending on coordinates and/or time, or some kind of data (from a file for examle)? |

Put "calculated" boundary conditionHi Sega,
Thank your attention. Let me explain what I want. I made a code to calculate the velocity field in an extrusion process with the following geometry: [IMG]file:///C:/DOCUME~1/ADMINI~1/CONFIG~1/Temp/msohtml1/01/clip_image002.gif[/IMG] I want to put, on the indicate surfaces, a manner to calculate the tangential velocity. I already put the boundary conditions like “fixedValue”, “fixedGradient”, “zeroGradient”, “symmetryPlane”, “empty” and all the conditions failed because the profile solution gets different mainly on the face number 1 when I do a comparison with the literature solution. Then, I want to put a “calculated” boundary condition and I hope it is work. This boundary condition is a friction boundary and it will be calculated by equation that it is being described on the paper that I put a part of the paper where this equation is being described. [IMG]file:///C:/DOCUME~1/ADMINI~1/CONFIG~1/Temp/msohtml1/01/clip_image002.gif[/IMG] [IMG]file:///C:/DOCUME~1/ADMINI~1/CONFIG~1/Temp/msohtml1/01/clip_image002.gif[/IMG] In the indicated surface, on the above figure, I want to calculate the tangential velocity where the used equation is inside the red rectangle described in the part of the paper above. This is, I have to implement this equation in my solver to calculate the tangential velocity on the boundary surfaces. I don’t know how I can make the implementation in the OpenFoam because I don’t know the commands and I don’t know which the place I have to put this comands. Could you help me? Thank so much!!! |

Well, I can't see your images, but I have learned that you have some kind of algebraic function which describes your boundary condition?!
In this case there is a tool called groovyBC, which can apply functional boundary conditions. |

Put "calculated" boundary conditionHi Sega,
Thank your attention. I’m sorry for the last post. Let me explain what I want. I made a code to calculate the velocity field in an extrusion process. I want to put, on the contact surface, a manner to calculate the tangential velocity in function of the internal velocity close the contact surface. How I said I tried all default boundary condition in OpenFoam but all failed. This boundary condition is a friction boundary and it will be calculated by following equation: vt = vtp <Φ[1 – f(ε)]> Where, vt is the tangential velocity on the contact surface, vtp is the internal velocity close on the contact surface, the terms McCauley’s < > brackets are “active” only for Φ>0. The function f(ε) is calculated by: { m · (pb/μb) · (hb/|vtp|) for Coulomb’s friction law f(ε) ={ { f · (ks/μb) · (hb/|vtp|) for constant friction law Where, m and f are friction coefficient and friction factor, respectively, ks is the yield shear stress, and μb is the viscosity and pb is the pressure at the boundary node, hb is the distance from the internal point close of the contact surface to the boundary. This is, I have to implement this equation in my solver to calculate the tangential velocity on the boundary surfaces. I don’t know how I can make the implementation in the OpenFoam because I don’t know the commands and I don’t know which the place I have to put this comands. Could you help me? I’m sorry again and thanks so much. |

Quote:
Sorry, I'm a little bit confused. You are talking about contact and boundary surfaces. What is that? |

Put "calculated" boundary conditionHi Sega,
My work has aim to calculate the velocity field in the extrusion process. My code solve the momentuum equation for all geometry, but I wanted that the my code solve the momentuum equation for the internal field and giving me the internal velocity and the tangential velocity, that is, the velocity on the surface should be calculated by the equation that I quoted in last post. Do you understand? If not ask me again. Thank you so much for your kind attention. |

I'm still not getting it, sorry.
If you want to simulate an extrusion process you are dealing with multiphase simulation?! The multiphase solver will be capable of dealing with the whole velocity field (internal or external - whatever that is to you?? Can you explain?).Would you be so kind to repost your images from above? (You can't use pictures from your hard-drive) Maybe this will help. |

Put "calculated" boundary condition1 Attachment(s)
Hi Sega
Let me try to explain again. I made some modification in the icoFoam solver to work with extrusion process in aluminium. I am working with the geometry showed in the first figure on the attached. I am getting to obtain the internal velocity field right when I compare with literature value. However, on the Face 1 in the first figure on the attached the velocity profile is giving different how you can see in the second figure on the attached that show the velocity contours for a central slice. I would like to become the solutions more closely each other. How I tried all default boundary condition available in the OpeFoam I want to put a calculated boundary condition, that is, I want to calculate the tangential velocity from this before equation. Thank your patient. |

Quote:
But still sounds like groovyBC to me. This tool can apply boundary conditions from functions. |

Put "calculated" boundary conditionOk, Sega
I'm going to see how this groovybc works. If I have doubt I can write you again. Thank you so much. |

Quote:
recently ,I am simulating an extrusion process too .I meet the same problem .I do not know how to set up the friction boundary condition .Have you solved the problem now? |

All times are GMT -4. The time now is 22:11. |