|
[Sponsors] |
June 5, 2013, 02:28 |
Need help with modifying setPressure.H
|
#1 |
Senior Member
Join Date: Jul 2011
Posts: 120
Rep Power: 14 |
Hi all, I am currently trying to develop a coupled solver. I am currently at the stage of coding the transfer of information between the 2 solvers. I am following the template setPressure.H due to the similarities.
Code:
{ Info << "Setting " << endl; // interpolates the pressure from the fluid field to the // solid patches at the fluid-solid boundary scalarField solidPatchPressure = interpolatorFluidSolid.faceInterpolate ( p.boundaryField()[fluidPatchID] ); solidPatchPressure *= rhoFluid.value(); // tforce is Reference for traction displacement BC tForce.pressure() = solidPatchPressure; // calculates total force from pressure vector totalPressureForce = sum ( p.boundaryField()[fluidPatchID]* mesh.Sf().boundaryField()[fluidPatchID] ); Info << "Total pressure force = " << totalPressureForce << endl; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modifying the laplacian operator | mlawson | OpenFOAM Running, Solving & CFD | 22 | July 16, 2018 04:56 |
modifying radial distribution function | ravindra | FLUENT | 2 | September 2, 2014 14:03 |
Modifying FLUENT plots | siw | FLUENT | 2 | April 4, 2013 10:53 |
Modifying density update in fireFoam | anfho | OpenFOAM Programming & Development | 3 | March 22, 2011 03:02 |
Modifying Gambit DBS file Created from MixSim 2 | gkennedy3 | ANSYS Meshing & Geometry | 0 | August 7, 2009 09:32 |