|
[Sponsors] |
Patch normals patch().nf() in basicSymmetryFvPatchField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 28, 2020, 10:04 |
Patch normals patch().nf() in basicSymmetryFvPatchField
|
#1 |
New Member
Saeed Salehi
Join Date: Aug 2010
Posts: 27
Rep Power: 16 |
Dear Foamers!
I am using surfaceSlipDisplacementFvPatchFields BC. It appears that it inherits from the slip BC and the slip BC inherits from the basicSymmetry. So it all comes down to the evaluate function in the basicSymmetry. This evaluate function simply eliminate the normal component to the patch by: Code:
tmp<vectorField> nHat = this->patch().nf(); const Field<Type> iF(this->patchInternalField()); Field<Type>::operator= ( (iF + transform(I - 2.0*sqr(nHat), iF))/2.0 ); transformFvPatchField<Type>::evaluate(); It can be seen that the normal vector to the patch, patch().nf(), is first read (the red line) and then the normal component of the quantity of interest is removed. Now, I have a case where the mesh is changing through time and OpenFOAM naturally updates the patch().nf() in each time-step. However, I specifically need to fix patch().nf(). In other words, I need to always read the patch normals, of the initial mesh (i.e., the mesh in the constant folder and not the mesh in the time folders). Any ideas or help would be much appreciated. Saeed Last edited by salehi144; September 1, 2020 at 05:55. |
|
August 28, 2020, 19:36 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
You could add a vectorField to a modified boundary class and initialize it within the constructor. But for this to be restart-enabled, you have to store this field in the write method of the boundary condition and read it if available in the constructor (the one with dict in the parameter list).
|
|
August 31, 2020, 10:24 |
|
#3 |
New Member
Saeed Salehi
Join Date: Aug 2010
Posts: 27
Rep Power: 16 |
Thank Joachim for the answer.
That seems a good idea. I will give it a try and let you know. Saeed |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plotting Surface tension force with interfoam | Mahmoud_aboukhedr | OpenFOAM Programming & Development | 5 | December 1, 2016 09:37 |
2D train nose profile analysis | Jchan88 | FLUENT | 2 | April 30, 2013 01:15 |