Re: [Nektar-users] [EXTERNAL] Re: Mapped boundaries
Thanks James for your response. You are correct… I am trying to setup a turbulent inlet bc. I will check the reference you provided. In regards to writing the data to file, I was hoping to be able to read the values from memory to avoid the need to write a large amount of data, but I am guessing there is something wrong with my approach here. Regards, Marc On Thu, Aug 11, 2022 at 8:19 PM Slaughter, James W < j.slaughter19@imperial.ac.uk> wrote:
[*Caution*: Email from External Sender. Do not click or open links or attachments unless you know this sender.]
Hi Marc,
I'm guessing you're trying to setup a mapped inlet turbulent bc?
If you look at a paper by Andrea Cassinelli titled ON THE EFFECT OF INFLOW DISTURBANCES ON THE FLOW PAST A LINEAR LPT VANE USING SPECTRAL/HP ELEMENT METHODS you'll see some of the ways we usually set turbulence parameters.
The mapped plane method isn't something we really can do easily at the moment. I guess when we have python wrappers for the solvers this might be a lot more possible. But you'll need to translate then interpolate the HistoryPoints sampled plane to the inlet points. This coupling I'm not sure would be easily achievable given what we have there at the moment.
Dumping to file as you suggest as well is the obvious solution but considering the length and timescales of the turbulent structures you probably want at the inlet - it'd be a lot of files and a lot of data.
I'd wait and see if you get a response from one of the Senior Devs who might have a bit more of an idea on if it might be achievable - but from my experience this would be extremely tricky and would require a fair bit of development time.
Cheers, James. ------------------------------ *From:* nektar-users-bounces@imperial.ac.uk < nektar-users-bounces@imperial.ac.uk> on behalf of Marc Goldbach < mgoldbac@uncc.edu> *Sent:* 11 August 2022 21:45 *To:* nektar-users <nektar-users@imperial.ac.uk> *Subject:* Re: [Nektar-users] Mapped boundaries
This email from mgoldbac@uncc.edu originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hi All,
To accomplish what I had described below, I am trying to implement a new boundary condition. Basically, I have implemented "SetUpMappedBoundary" and "SetMappedBoundary" functions in " solvers/IncNavierStokesSolver/EquationSystems/IncNavierStokes.cpp" similar to how the Womersly boundary is implemented. In " SetUpMappedBoundary", a "fromptsidx" array is populated where each element in the array corresponds to a node on the boundary, and the values of the "fromptsidx" array stores the corresponding index in the volume field expansion from which the physical value is to be extracted.
In "SetMappedBoundary", I expect to be able to set the boundary using:
Bvals = BndCondExp->UpdatePhys();
for (int i; i < exp_npts; ++i) { Bvals[i] = VolFieldExp->GetPhys(fromptsidx[i]); }
However, when running the simulation the boundary values are not updated (but are set to a 0 value everywhere on the boundary). When printing debugging information from SetMappedBoundary function it seems that the Bvals array does contain non-zero values:
Setting mapped boundary... min volField, fldid = 0: -0.236872 max volField, fldid = 0: 0.0905436 avg volField, fldid = 0: -0.00344391 nVolField: 198 min Bval, fldid = 0: -0.233878 max Bval, fldid = 0: 1
Any suggestions on how I can correctly update inlet boundary values from the Bvals array?
Regards,
*Marc Goldbach* PhD Student, Department of Mechanical Engineering University of North Carolina at Charlotte
On Sun, Jun 5, 2022 at 6:44 PM Marc Goldbach <mgoldbac@uncc.edu> wrote:
Hi All,
I would like to sample data from a plane within my domain (turbulent channel), and use those values as the inlet boundary. The plane at which data is sampled is in the middle of the domain, so a periodic boundary is not suitable. Is this possible, and if so how can I do this?
So far I have looked at using the "HistoryPoints" filter to extract data from the simulation along a plane, but I cannot quite figure out how to read the time dependent boundary data from file:
88 <BOUNDARYCONDITIONS> 95 <REGION REF="0"> 96 <D VAR="u" FILE="periodicInlet_<!--What do I put here??-->"/> 97 <D VAR="v" VALUE="0" /> 98 <D VAR="w" VALUE="0" /> 99 <N VAR="p" USERDEFINEDTYPE="H" VALUE="0" /> 100 </REGION> ... 185 </BOUNDARYCONDITIONS> ... 256 <FILTER TYPE="HistoryPoints"> 257 <PARAM NAME="OutputFile">periodicInlet</PARAM> 258 <PARAM NAME="OutputFrequency">1</PARAM> 259 <PARAM NAME="OutputOneFile">false</PARAM> 260 <PARAM NAME="plane"> 261 100, 100, 262 0, 0, 0, 263 0, 7, 0, 264 0, 0, 2, 265 0, 7, 2 266 </PARAM> 267 </FILTER>
When using <PARAM NAME="OutputOneFile">false</PARAM>, the history point data is saved in files based on index (e.g. periodicInlet_0, periodicInlet_1, periodicInlet_2, etc.)
Any suggestions are appreciated.
Regards,
*Marc Goldbach* PhD Student, Department of Mechanical Engineering University of North Carolina at Charlotte
--
*Marc Goldbach* PhD Student, Department of Mechanical Engineering University of North Carolina at Charlotte
participants (1)
- 
                
                Marc Goldbach