|
[Sponsors] |
Updating pointDisplacement within the solver? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 22, 2020, 02:41 |
Updating pointDisplacement within the solver?
|
#1 |
Member
Bidesh Sengupta
Join Date: Sep 2018
Location: Sngapore
Posts: 76
Rep Power: 8 |
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(); 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 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 |
|
Tags |
foam extend, mesh deformation, morphing, pointdisplacement |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Population Balance Modeling (PBM) - Ansys Fluent | chittipo | FLUENT | 164 | November 18, 2023 12:54 |
fluent divergence for no reason | sufjanst | FLUENT | 2 | March 23, 2016 17:08 |
Modify pointDisplacement field from within solver? | nowhere | OpenFOAM Programming & Development | 2 | October 13, 2011 14:53 |
Quarter Burner mesh with periosic condition | SamCanuck | FLUENT | 2 | August 31, 2011 12:34 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 15:08 |