Code Monkey home page Code Monkey logo

Comments (8)

jerabaul29 avatar jerabaul29 commented on July 19, 2024

Hi!

This is because of how non-dimensionalization is made. Unfortunately in the code we are using dimensional quantities (because of some legacy reasons), and non-dimensionalization has to be done afterhand.

Namely, if you look in details at how nu, \bar{U} and D are defined, you will see that you need to renormalize the value of the drag coefficient by mutliplying a factor:

coeff_CD = -2.0 / 1.0 / (2 * 1.5 / 3)**2 / 0.1 = -20

This will give you a typical value of the drag coefficient of 2.6 to 3.5 in normalized unit.

The same applies for the time; you will have to apply a factor of 10 (here also, if you look in details in the code) to convert between the time in the simulation and the non-dimensional time.

Can you confirm me that this works for you?

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

PS: the values obtained after normalization can be checked against the benchmark by Turek; see:

http://www.mathematik.tu-dortmund.de/lsiii/cms/papers/SchaeferTurek1996.pdf

The case b) 2D-2 is the same as ours (just note that they write 4 U_m = 4 * 1.5 = 6 while we write 6 in our paper for the coefficient in front of the inflow condition formula, and that their domain is centered in H/2 while our domain is centered around 0 in the Z direction, hence the difference for the H and H/2 stuff). You can check that they get the same typical value for both the drag coefficient C_D and the Strouhal number St in their table 4; respectively, C_D approx 3.23 and St approx 0.30.

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

PPS: I added a note about this in the Readme: 68efde7#diff-04c6e90faac2675aa89e2176d2eec7d8 .

Please confirm that this solves your problem.

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

PPPS: about the St, remember that the signal for the drag coefficient oscillates at twice the vortex shedding frequency due to symmetry of the problem... ;)

from cylinder2dflowcontroldrl.

yangtianyong avatar yangtianyong commented on July 19, 2024

yes ,those are really useful to deal with my problem,and now i know how to use my data correctly,thank you ,professor!

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

I keep opened as this may interest also other people.

Also, I am not a professor and you can as a rule just use 'you' in the tech world / on GitHub when discussing, people will not take offense and it is faster and easier to read ;)

from cylinder2dflowcontroldrl.

gonanc13 avatar gonanc13 commented on July 19, 2024

Hi Jean,

For the final year project of my Aeronautics degree at Imperial College I'm using your code. I'm turning the body into a rectangular cylinder (for resemblance with road vehicles) to study the adaptivity of RL to variations in the incidence and aspect ratio of the cylinder.

I understand that your code defines the simulation geometry using dimensional quantities and then you non-dimensionalize the results using the relevant quantities. However, the 2D Navier Stokes equation reported in your code is in the non-dimensional form.

  1. Are the equations being solved by FEniCS in the code the dimensional or non-dimensional form of 2D Navier Stokes equations?

  2. If it is the non-dimensional form that is numerically solved, what would be the issue in just using non-dimensional quantities to define the problem:
    -in the case of the circular cylinder diameter=1, timestep=0.005, cylinder mesh size = 0.1, etc
    instead of dimensional ones:
    -diameter=0.1, timestep=0.0005, cylinder mesh size = 0.01

Sorry if this is a silly question, I don't have that much experience with CFD

Thanks!

from cylinder2dflowcontroldrl.

jerabaul29 avatar jerabaul29 commented on July 19, 2024

Regarding the code, if I remember well we use the same dimensions as in the Turek paper, but with slightly different coordinate origins: see the messages in this thread from 27th May 2019. The paper uses a different, non dimensional form.

If you want to use another geometry, you will need of course to adapt the code. For a short discussion of the kind of things you may need to adapt, please see #16 .

from cylinder2dflowcontroldrl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.