Re: [Nektar-users] Rescaling velocity inlet conditions read from .fld files
Hi all, I have attached a snippet of a working version. Thank you Spencer and Andrea! Andrea, For rescaling the flow I had to extract the boundary data again outside the flow-rate calculation loop. Anyway, for the record (as you mentioned earlier) I did not see much effect on the number of iterations (and the CPU time) after rescaling (opposed to pimpleFoam). BR, Vishal --- *Vishal SAINI* On Mon, Jun 15, 2020 at 9:45 PM Cassinelli, Andrea < andrea.cassinelli15@imperial.ac.uk> wrote:
Hi Vishal,
I had a look through and cannot spot anything obvious. Just to make sure, you are expecting to get 1 when you call VerifyFlowRate, is that right? After you call this method are you supposed to be working in coefficient space of physical space?
Alternatively you can try effectively passing bndVelPhys to the NormaliseFlowRate method to test an alternative approach, without transforming back and forth.
Are you using 3D or 2.5D? In the latter case you also need to make sure you are in the correct space (calling BndExp[bndid]->GetWaveSpace() and BndExp[bndid]->SetWaveSpace(true) to change it).
Lastly, have you tried following the execution with a debugger to check where the values “swap" back?
Cheers,
Andrea
On 15 Jun 2020, at 17:48, Vishal Saini <vishal.saini.nitj@gmail.com> wrote:
Hi Andrea,
Thanks for your reply. I have written a function to calculate the flow rate through time-dependent BCs. This seems to work fine even with non-planar inlets. I am however facing problems in re-scaling the velocities accordingly. I am attaching a snippet for you to have a look. So, in *NormaliseFlowRate()* when I normalise the *bndVelPhys *in line 114, it does not reflect in actual velocity values. This is seen from the output of *VerifyFlowRate()*. Can you spot an obvious mistake?
As soon as this is fixed, we can flag this as done in the mailing-list.
BR, Vishal
--- * Vishal SAINI*
On Sun, Jun 14, 2020 at 11:52 PM Cassinelli, Andrea < andrea.cassinelli15@imperial.ac.uk> wrote:
Hi Spencer,
I had emailed Vishal separately on this matter, which I believe should be solved now. @Vishal am I right? I not included the mailing list as my answer referred to a branch we had been previously discussing so I wasn’t sure it would make sense to include everyone.
Cheers,
Andrea
On 14 Jun 2020, at 23:09, Sherwin, Spencer J <s.sherwin@imperial.ac.uk> wrote:
Hi Vishal,
Sorry not to respond sooner. Things have been busy.
Mohammad, has spent some time debugging this feature to add termperature field. @Mohammad can you see if you can help Vishal?
Cheers Spencer.
Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, s.sherwin@imperial.ac.uk South Kensington Campus, Phone: +44 (0)20 7594 5052 Imperial College London, Fax: +44 (0)20 7594 1974 London, SW7 2AZ, UK http://www.imperial.ac.uk/people/s.sherwin/
On 1 Jun 2020, at 19:25, Vishal Saini <vishal.saini.nitj@gmail.com> wrote:
This email from vishal.saini.nitj@gmail.com 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,
I have a little query regarding reading time varying turbulent BC from .fld files in IncNSSolver. With Dave 's helping hand I am now able to read in the .fld BC files. However, to reduce pressure fluctuations at the inlet, I'd like to rescale the inlet flow-rate to a required flow-rate for every time-step. This would typically include the following steps:
1. Find area of the inlet boundary 2. Take dot product of area normal and velocity vectors 3. Multiply the velocity vector with a correction factor (Q_ideal/Q_calculated)
In this regard, the function VelocityCorrectionScheme::MeasureFlowrate looks interesting. However, I have little idea where to start with. Could someone drop any hints on where can I start with this in the code?
BR, Vishal
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
<snippet.cpp>
participants (1)
- 
                
                Vishal Saini