Setting normal gradient as BC
Hi all,
I am editing icoFoam for a specific calculation in which I want to set the normal gradient of a patch as a boundary condition. So normally scalar field 'c' would be solved using the BCs for the values of 'c', but now I would like OF to use normal gradient 'dc/dn' as BC. I know that 'c.boundaryField()[patch].snGrad()' would return the values of the normal gradient, but I'd like it vice versa. Anyone know if this is possible at all? Thanks in advance, |
Hi,
You can use the fixedGradient boundary condition to set a patch normal gradient to a user-specified value. Hope this helps, Fumiya |
Hi Fumiya,
Thanks for your reply. I was aware that this was the way to go for the initial conditions. However, I would like OF to do this for me as a BC that changes each timestep. To give a bit more information: I am using an external solver that calculates dc/dn from other quantities. The goal is to set this calculated dc/dn as BC for the next timestep. Therefore, I need a way (be it a provided member function or a more elaborate method) to incorporate this in the solver itself. Thanks, |
Hi Dozer_94,
The following thread will be of help: https://www.cfd-online.com/Forums/op...iteration.html Fumiya |
Thank you Fumiya, this was exactly what I was searching for. Seems like something I could have figured out myself, though.
|
All times are GMT -4. The time now is 00:01. |