CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Generation of velocity field by solving LNSE around base flow generated by icoFoam (https://www.cfd-online.com/Forums/openfoam-solving/235875-generation-velocity-field-solving-lnse-around-base-flow-generated-icofoam.html)

Samarth_2412 May 3, 2021 10:58

Generation of velocity field by solving LNSE around base flow generated by icoFoam
 
Hi all,
I am trying to study the instability of boundary layer flows by modifying icoFoam solver to create the LNSE solver, I have made the following changes to the standard icoFoam solver, where U is the perturbation term and UB the base flow velocity

dirIcoFoam.c: (modified part in icoFoam)
Code:

fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phiB, U)
          + fvc::div(phi, UB)
          - fvm::laplacian(nu, U)
        );

In createFields.H, added the following

Code:

Info<< "Reading field UB\n" << endl;
volVectorField UB
(
    IOobject
    (
        "UB",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

surfaceScalarField phiB
(
    IOobject
    (
        "phiB",
        runTime.timeName(),
        mesh,
        IOobject::READ_IF_PRESENT,
        IOobject::AUTO_WRITE
    ),
    fvc::flux(UB)
);

I have successfully compiled the modified solver and also generated results of the base flow using icoFoam at the required reynolds number.
Current methodology to approach the problem:
  1. generate base flow using icoFoam
  2. use the solutions obtained at the final time step as initial file for "UB" in the "0" directory for the LNSE solver run
  3. analysis of the perturbed flow "U"
My confusions: I am confused about step 2 in my methodology, as I'm unsure whether it will be acceptable to simply take the final step in the base flow sim and neglect the previous time steps, or should i be looking to incorporate the previous time steps as well, and if so, can anyone guide me how to execute this?
Also, i would appreciate if anyone found an error in my code and made me aware of it!


Thank you

saicharan662000@gmail.com March 17, 2024 16:55

Regarding Test case
 
Hi Samarth,
I am trying to do some research on instability analysis on fluid flow. The modification looks good. But I didn't understand the boundary condition for UB. Did you calculate the eigenmodes for the analysis. If you had calculated the Eigen modes, How did you do that. Can you help me with this? If possible can you send me the test case.


All times are GMT -4. The time now is 17:39.