CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Updating pointDisplacement within the solver?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2020, 01:41
Default Updating pointDisplacement within the solver?
  #1
Member
 
Bidesh Sengupta
Join Date: Sep 2018
Location: Sngapore
Posts: 76
Rep Power: 7
BSengupta is on a distinguished road
Hi,


Let me first try to describe what I wish to do:


I am trying to make a mesh deformation solver. I am working on aircraft icing. After all the other calculations are done, the thickness of the ice is obtained as output. I need of deform or morph the mesh according to thickness of ice accreted on the surface.



I wrote the following code:


Code:
volScalarField UNn_X = UN.component(vector::X);
        volScalarField UNn_Y = UN.component(vector::Y);
        volScalarField UNn_Z = UN.component(vector::Z);
        
        UNn = (-UNn_X*i) + (-UNn_Y*j) + (-UNn_Z*k);
        
        pointMesh pMesh(mesh);
        volPointInterpolation vpi(mesh);
         pointVectorField Um = vpi.interpolate(UNn);
         pointScalarField Thp = vpi.interpolate(Thick);
         //~ pointVectorField pointDisplacement = Thp*Um;
         pointDisplacement_ = Thp*Um/lref;
         
        pointDisplacement_.correctBoundaryConditions();
        Info<< "pointDisplacement_ = " << pointDisplacement_ << endl;
        runTime++;
        Info<< "Time = " << runTime.timeName() << nl << endl;

        Info<<"deformationFOAM START"<< endl;
        
        Info<<"Mesh Moving"<<endl;
        mesh.update();
         mesh.write();
Here, UN is the normal vector to boundary.

But the code do not calculate pointDisplacement automatically, but when the displacement is given manually it deforms the mesh as expected. But I need to generate pointDisplacement automatically according to given distance.



In createFields, I defined the quantities as following:
Code:
volScalarField Thick
    (
        IOobject
        (
           "Thick",
            runTime.timeName(),
            mesh,
            IOobject::READ_IF_PRESENT,
            IOobject::AUTO_WRITE
         ),
         mesh,
         dimensionedScalar("Thick",dimensionSet(0,1,0,0,0),0.),
         zeroGradientFvPatchScalarField::typeName
    );
    
    pointVectorField pointDisplacement_
    (
    IOobject
        (
            "pointDisplacement",
            mesh.time().timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        pointMesh::New(mesh),
        dimensionedVector("pointDisplacement",dimensionSet(0,1,0,0,0,0,0),vector::zero),
        zeroGradientFvPatchVectorField::typeName
    );

dimensionedScalar lref("A",dimensionSet(0,1,0,0,0,0,0), 1.0);
I am using foam-extend 4.0.


I shall be really grateful and helped if anyone can suggest me necessary changes in the code to achieve what I need.


Thanks a lot,
Bidesh
BSengupta is offline   Reply With Quote

Reply

Tags
foam extend, mesh deformation, morphing, pointdisplacement

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Population Balance Modeling (PBM) - Ansys Fluent chittipo FLUENT 164 November 18, 2023 11:54
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 16:08
Modify pointDisplacement field from within solver? nowhere OpenFOAM Programming & Development 2 October 13, 2011 13:53
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


All times are GMT -4. The time now is 06:57.