|
[Sponsors] |
New boundary condition: second derivative to zero |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 16, 2018, 09:41 |
New boundary condition: second derivative to zero
|
#1 |
New Member
Join Date: Apr 2018
Posts: 3
Rep Power: 8 |
Hello everybody,
I have looked through CFD-online, and I admit I found a few threads that are related to my question (for instance Second Derivative Zero - Boundary Condition) but ... well, I still have no idea where to start the implementation, so I seek your help. The set-up: I have a channel, basic rectangular geometry. The bocos : at inlet I have a UDF that induces a pressure pulse, and at outlet I would like to have the (in)famous convective boundary condition, i.e. du/dt + cdu/dx = D (d^2 u/dx^2) = 0. The problem : I played with inlet UDFs, I played with UDFs to impose a velocity at a wall, to have this velocity depending on a normal gradient even ... but how do you impose a second derivative to be zero at an outlet boundary condition ? Any help is welcome, thank you so much in advance. T |
|
April 16, 2018, 10:55 |
|
#2 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi there T,
I'm interested to hear any positive responses, but if you don't get any, I think you could conclude that Fluent is not going to make this easy for you. Try another code? If I think about how I would try it in Fluent if forced at gunpoint, my brain melts slightly. We can follow the plan in that OpenFoam thread (which you linked to): we can calculate the inlet velocity retrospectively, one timestep behind. So we "only" need to calculate first and second derivatives of u, and use them to define the next step's inlet velocity. (1) To get the timing right, we could do the calculations for the next timestep at the end of the current timestep, in DEFINE_EXECUTE_AT_END. (2) We store the result from those calculations in User-Defined Memory... oh dear, probably not available for an inlet. Store it in the neighbouring cell, and arrange the mesh such that no cell contains more than one inlet face. (3) How do we calculate the derivatives? You have a rectangular block, so you can have a structured mesh, so you could calculate it yourself if necessary. (If running in parallel, arrange the mesh partition that at least three layers of cells from the inlet are in the same partition.) You would need to look up the cell neighbouring the inlet, then find the cell downstream of that, and possibly the cell downstream of the downstream cell. (We are probably calculating derivatives at cell centres, even though we want them at faces. We assume hex cells, or at least prismatic.) With a bit of ingenuity, you could store the identities of those looked-up cells in User-Defined Memories. It would help to arrange the mesh to guarantee that there are is only one cell zone within three or four cells of the inlet. (4) Alternatively, you can copy quantities like C_U into User-Defined Scalars, and get Fluent to calculate the derivatives of the scalars. Then copy those derivatives into other UDS(s), and get Fluent to calculate the derivative of that/those. (There are commands to force Fluent to calculate a set of derivatives -- see UDF-How to calculate gradient of a scalar . There is no official documentation that I know of, but you will get some semi-official hints if you search for Scalar_Derivatives etc in the ANSYS Customer Portal.) Now you have some sort of first and second derivatives. You would need to do some hard thinking and testing to see what boundary conditions are suitable for the UDSs at the inlet. So I would estimate that as a couple of weeks of solid work (at least), to reach something which is not really what you asked for and is probably unstable. Are you sure you want to do this? Ed |
|
April 16, 2018, 11:15 |
|
#3 | |||
New Member
Join Date: Apr 2018
Posts: 3
Rep Power: 8 |
Hello Ed,
Thank you for your interest. Ahah yea ... if only ..! Let us assume I am forced to use Fluent ... at gunpoint Quote:
Anyways your thoughts on the matter are very interesting to me. Quote:
Quote:
But, one I know the value of the second derivative, any toughts on how to make it zero at each timestep ? In a way where Fluent gets the info and the flow behaves in consequence ? Ehh ... gunpoint thing ... Or even if there is no gunpoint, I am in a situation where I cannot think of anything else to get my simulations to match the experimental data I have and it is kinda devouring me Thanks everyone for any input ! T |
||||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 11:20 |
inlet velocity boundary condition | murali | CFX | 5 | August 3, 2012 09:56 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 03:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |