|
[Sponsors] |
September 9, 2019, 05:45 |
To achieve moving boundary
|
#1 |
New Member
ewz
Join Date: May 2019
Posts: 3
Rep Power: 7 |
Hi,Foamers,
I have tried to revise oscillatingDisplacement to achieve moving boundary which the motion of the boundary was a function of spatial position and time(such as f(x,t)). After I compiled the new oscillatingDynamic, there were some errors. The new oscillatingDynamic and the error were as follows: Code:
void oscillatingDynamicPointPatchVectorField::updateCoeffs() { if (this->updated()) { return; } const pointPatch& p = this->patch(); const polyMesh& mesh = this->internalField().mesh()(); const Time& t = mesh.time(); scalar x = p.x(); Field<vector>::operator=(amplitude_*cos(omega_*t.value()))*sin((x-0.1)*6.28/0.1)); fixedValuePointPatchField<vector>::updateCoeffs(); } Code:
pointPatchFields/derived/oscillatingDynamic/oscillatingDynamicPointPatchVectorField.C: In member function ‘virtual void Foam::oscillatingDynamicPointPatchVectorField::updateCoeffs()’: pointPatchFields/derived/oscillatingDynamic/oscillatingDynamicPointPatchVectorField.C:112:21: error: ‘const class Foam::pointPatch’ has no member named ‘x’ scalar x = p.x(); ^ pointPatchFields/derived/oscillatingDynamic/oscillatingDynamicPointPatchVectorField.C:114:87: error: invalid operands of types ‘void’ and ‘Foam::doubleScalar {aka double}’ to binary ‘operator*’ ld<vector>::operator=(amplitude_*cos(omega_*t.value()))*sin((x-0.1)*6.28/0.1)); ^ |
|
September 20, 2019, 07:54 |
patch field does not correspond to the meshPoints
|
#2 |
New Member
ewz
Join Date: May 2019
Posts: 3
Rep Power: 7 |
After times trying,the new pointdisplacement has been successfully compiled, but when I try to do simulation of moving boundary,there are errors as follows:
Code:
given patch field does not correspond to the meshPoints. Field size: 0 meshPoints size: 4221 From function void Foam::pointPatchField<Type>::setInInternalField(Foam::Field<Type2>&, const Foam::Field<Type2>&, const labelList&) const [with Type1 = Foam::Vector<double>; Type = Foam::Vector<double>; Foam::labelList = Foam::List<int>] FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 void Foam::pointPatchField<Foam::Vector<double> >::setInInternalField<Foam::Vector<double> >(Foam::Field<Foam::Vector<double> >&, Foam::Field<Foam::Vector<double> > const&) const at ??:? #3 Foam::oscillatingDynamicPointPatchVectorField::updateCoeffs() at ??:? #4 Foam::displacementLaplacianFvMotionSolver::solve() at ??:? #5 Foam::motionSolver::newPoints() at ??:? #6 Foam::dynamicMotionSolverFvMesh::update() at ??:? #7 ? at ??:? #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 ? at ??:? And I don't know how to solve the problem; I really appreciate it if someone could give me your advices. Thanks a lot. Last edited by ewz; September 20, 2019 at 09:07. |
|
September 24, 2019, 06:35 |
new problem
|
#3 |
New Member
ewz
Join Date: May 2019
Posts: 3
Rep Power: 7 |
The error that patch field don't correspond to meshpoints had been solved.
But a new problem was coming as follows: Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:? #4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:? #5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #6 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? #8 ? at ??:? #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #10 ? at ??:? |
|
April 5, 2023, 06:43 |
|
#4 |
New Member
Grp
Join Date: Feb 2023
Posts: 14
Rep Power: 3 |
Hello, have you solved this problem? I'm having the same issue now.
|
|
Tags |
moving boundary |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 06:57 |
Velocity vector in impeller passage | ngoc_tran_bao | CFX | 24 | May 3, 2016 22:16 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
Problem in setting Boundary Condition | Madhatter92 | CFX | 12 | January 12, 2016 05:39 |
Low torque values on Screw Turbine | Shaun Waters | CFX | 34 | July 23, 2015 09:16 |