fronterapp / thesis-FloatingTurbine

Repository containing the simulation setups and libraries from the thesis 'CFD Simulation of a Floating Wind Turbine with OpenFOAM'.
Other
37 stars 16 forks source link

about the code #1

Open chenboyao opened 1 year ago

chenboyao commented 1 year ago

hello ,I want to know the code is use in OpenFOAM2012,and which can use in OpenFOAM2206 ? I had tried tio couple wave2foam in OpenFOAM2206.but it is failed.

fronterapp commented 1 year ago

Hi cehnboyao,

The different libraries used in this project (resulting from the combination of waves2Foam + sixDoFRigidBodyMotion + turbinesFoam) have only been tested in OpenFOAM v2012, thus I cannot guarantee 100% compatibility with other versions.

Yet if you give more details as to what's happening, maybe together we can find a solution.

Best regards, Pere

sachinsreedhar commented 12 months ago

How to get wavesDymFoam?

fronterapp commented 11 months ago

How to get wavesDymFoam?

wavesDymFoam is a modification of the waves2Foam library that allows dynamic mesh techniques. There's a short tutorial on how to set it up on the GitHub page of Chapter 5. I hope that can help you!

fronterapp commented 11 months ago

Hi fronter: when I install the foamTurbinesFoam in OpenFOAM2206,and it show the error,could you help me to solve the issue

I'm sorry you are facing issues with the installation. As I said in my first comment, if you could give more details as to what's happening maybe we can find a solution.

chenboyao commented 11 months ago

Hi fronter: when I install the foamTurbinesFoam in OpenFOAM2206,and it show the error,could you help me to solve the issue

I'm sorry you are facing issues with the installation. As I said in my first comment, if you could give more details as to what's happening maybe we can find a solution.

Thank you very much for your positive answer.

chenboyao commented 11 months ago

1 2 3

Hi Pere: when I use you code in OpenFOAM2012,it show about the error: in the 1st picture,show no MRF Model ; and the next picture,it show than Unknow fvOption type ,but I didnot change the case fvOption.

Best regards, chen

hfchen20 commented 9 months ago

@chenboyao Did you see any loading library errors at the beginning of the log file?

libs ( "libfloatingTurbinesFoam.so" );

Somehow, the library is compiled as

LIB = $(FOAM_USER_LIBBIN)/libmyTurbinesFoam

I noticed the same thing for floatingSixDoFRigidBodyMotion, which is in Make/file

LIB = $(FOAM_USER_LIBBIN)/libnewSixDoFRigidBodyMotion

fronterapp commented 9 months ago

@hfchen20 These are the lib names I used in an early version of the project. It's my fault not to double-check!

Try changing the floatingTurbinesFoam compilation to: LIB = $(FOAM_USER_LIBBIN)/libfloatingTurbinesFoam

and floatingSixDoFRigidBodyMotion to: LIB = $(FOAM_USER_LIBBIN)/libfloatingSixDoFRigidBodyMotion

Please let me know if that resolved the loading errors.

Best, Pere

hfchen20 commented 9 months ago

@fronterapp Nice work! I'm not planning to test your library at the moment though. Just thinking about adding waves2FoamMooring to the restraint library I developed at https://gitlab.com/hfchen20/foamMooring.

Rewrite it so that one restraint can allow definition of more than one mooring line and automatic generation of vtk files at runtime. How did you visualize the mooring lines? It seems to me you did not include the utility, as provided by the wave2Foam library, to write mooring lines.

fronterapp commented 9 months ago

@hfchen20 thank you! I just reviewed your foamMooring library, what a nice work you did! It's a shame I did not find out about your work earlier, I'd have been super useful for my thesis.

Regarding your question, I did not include the visualization utility from waves2Foam. I worked on a VTK generation script but it did not work as expected. And because I was running out of time, I had to prioritize other parts of the project.

So yeah, with my library you cannot visualize the mooring lines, which is an important limitation.

hfchen20 commented 9 months ago

@fronterapp I have just added this mooring restraint at my repo with some simple docs. Initial test showed that it generated VTK files at runtime. It should be compilable on recent versions of OpenFOAM. Hopefully someone may find it useful.

catenaryLine
{            
    sixDoFRigidBodyMotionRestraint  waves2FoamMooring;
    anchor
    (
        (-0.889    0.3725    -0.6)
        (-0.889   -0.3725    -0.6)
        ( 0.889    0.3725    -0.6)
        ( 0.889   -0.3725    -0.6)  
    );
    refAttachmentPt
    (
        (-0.25     0.3725   -0.16)
        (-0.25    -0.3725   -0.16)
        ( 0.25     0.3725   -0.16)
        ( 0.25    -0.3725   -0.16)  
    );

    identicalProperties true; // default true; if false, specify a list 
                              // for mass, e.g. (0.149 0.149 0.149 0.149)
                              // and line length, e.g. (0.809 0.809 0.809 0.809)
    massPerLength       0.149; // Wet mass/unit length
    lineLength          0.809; // Length of the mooring line

    gravityVector       (0 0 -9.81); // Gravity vector

    writeForce          true; // optional, default false
    writeVTK            true; // optional, default false

    //nNodes              10; // optional, default 10
    //nodesPerLine        (8 6 7 9); // optional, if absent, all lines having the same
                                     // (nNodes);  if present, overwrite nNodes 
    //vtkPrefix           "wfoamMoor"; // optional, default restraint name
    //vtkStartTime        0; // optional, default 0
    //outerCorrector      3; // optional, default 3
}