I'd like to bother you all wit
I'd like to bother you all with a question again, sorry about it.
I've tried to update a boundary condition on each timestep based on values of the solution of the earlier steps.
The field I want to modify is a scalar and the boundary is defined as a uniform fixedValue.
I've tried to update it by including lines:
variable.boundaryField()[patchI] = newValue;
in to the time loop. newValue is a scalar which is calculated on each timestep.
As many you must have noticed by now, it doesn't work. The values on the boundary patch don't change, even if the newValue changes.
What is the correct way to do this?
variable.boundaryField()[patchI] == newValue;
The important bit is the double "==".
Thank you!! Works perfectly!
Thank you!! Works perfectly!
I had given up on doing it in the solver was writing a boundary condition to do it.
Well doing it as a boundary co
Well doing it as a boundary condition is probably the "best" way of going about things.
Performing the assignment in the solver is a lot quicker to code though!
Hi "I've tried to update it
"I've tried to update it by including lines:"
Can you give me an excample for the time loop? I also want to update the boundary condition for U after every iteration. I want use the bouyantSimpleFoam.
Thanks a lot
Hi Juho and Eugene I want t
Hi Juho and Eugene
I want to implement a boundary condition that reads values from the previous time step and sets the gradient of another variable at the boundaries.
More specifically, I am trying to set the pressure gradient at the boundaries based on the temperature calculated in the previous time step.
dp/dz = g*beta*(T-Tref)
Could you giveme some pointers for doing that?
Hi Adam Am I glad that you
Am I glad that you jumped in!
Thanks for these detailed instructions. Will try them out.
Thanks a lot.
I want to update a boundary condition called “ABAJO” on each timestep based on the values of the solution of the previous timestep. Particularty, I want to correct the variable T2=110*gamma.
I have written this code:
label inletPatchID = mesh.boundaryMesh().findPatchID("ABAJO");
fvPatchScalarField& condition = T2.boundaryField()[inletPatchID];
T2.boundaryField()[patchI] = 110*gamma.boundaryField()[patchI];
The solver compiles Ok, but when I run the tutorial I have the following error:
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/isabel/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/isabel/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xb7766400]
#3 main in "/home/isabel/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/17marzo5"
#4 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#5 _start at /build/buildd/glibc-2.9/csu/../sysdeps/i386/elf/start.S:122
|All times are GMT -4. The time now is 06:35.|