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

How to obtain initial condition in codedFixedValue boundary condition

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2024, 11:34
Default How to obtain initial condition in codedFixedValue boundary condition
  #1
New Member
 
Junyu Ni
Join Date: Sep 2022
Posts: 3
Rep Power: 4
Junyu is on a distinguished road
Hi, everyone. I want to achieve a particular dynamic boundary that is coupled with fluid pressure and dependent on initial geometry.
In a brief form, the boundary displacement \eta satisfies the equation \partial^2\eta/\partial{t^2}+\nabla^2\eta=-p,where \eta is the displacement along the initial normal direction of the wall(here it is a cylinder), and p is the fluid pressure.
I use the dynamicMotionSolverFvMesh as dynamicFvMesh and displacementLaplacian solver. In the pointDisplacement dictionary, I set the moving boundary as the codedFixedValue type and try to solve the above equation.
Now I need to obtain the normal direction at the initial time. I don't know which patch I should use.
By the way, I found a 'points0' in the displacementLaplacian that seems to be the initial position, but it seems not accesible directly.
I have the following codes to obtain pressure on the boundary at present Time:
Code:
const fvMesh& mesh = this->patch().boundaryMesh().mesh();
label cylinderID = mesh.boundaryMesh().findPatchID("cylinder");
volScalarField& tempP = mesh.lookupObjectRef<volScalarField>("p");
const fvPatchScalarField& cylinderP = tempP.boundaryField()[cylinderID];
Any suggestion will be appreciated. Thanks in advance!
Junyu is offline   Reply With Quote

Reply

Tags
codedfixedvalue, displacementlaplacian, dynamic boundary, dynamic mesh, initial mesh

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
foam extend solid contact simulation blow up CRI_CFD OpenFOAM CC Toolkits for Fluid-Structure Interaction 4 February 28, 2023 05:54
Compressible flows with larger Courant numbers Tobi OpenFOAM Running, Solving & CFD 5 February 26, 2021 16:20
laplacianFoam with source term Herwig OpenFOAM Running, Solving & CFD 17 November 19, 2019 14:47
chtMultiRegionSimpleFoam: maximum number of iterations excedeed. Nkl OpenFOAM Running, Solving & CFD 19 October 10, 2019 03:42
Free surface issues with interDyMFoam for hydroturbine oumnion OpenFOAM Running, Solving & CFD 0 October 6, 2017 15:05


All times are GMT -4. The time now is 11:31.